File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/gui/GuiPackage.java | File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/timers/ConstantThroughputTimer.java | |||
Method name: JMeterGUIComponent getGuiFromCache(Class, Class)
|
Method name: long calculateDelay()
|
|||
Number of AST nodes: 4 | Number of AST nodes: 5 | |||
1 | comp = (TestBeanGUI) testBeanGUIs.get(testClass);↵ | |||
2 | if (comp == null) {↵ | |||
3 | comp = new TestBeanGUI(testClass);↵ | |||
4 | testBeanGUIs.put(testClass, comp);↵ | |||
5 | ↵ | 1 | synchronized (threadGroupsInfoMap) {↵ | |
2 | groupInfo = (ThroughputInfo)threadGroupsInfoMap.get(group);↵ | |||
3 | if (groupInfo == null) {↵ | |||
4 | groupInfo = new ThroughputInfo();↵ | |||
5 | threadGroupsInfoMap.put(group, groupInfo);↵ | |||
6 | }↵ | |||
6 | } | 7 | } | |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 1 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.1 |
Clones location | Clones are in different classes |
Number of node comparisons | 11 |
Number of mapped statements | 2 |
Number of unmapped statements in the first code fragment | 2 |
Number of unmapped statements in the second code fragment | 2 |
Time elapsed for statement mapping (ms) | 0.9 |
Clone type | Type 3 |
ID | Statement | ID | Statement | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3 | comp = (TestBeanGUI)testBeanGUIs.get(testClass); | | |||||||||||||||||||
4 | if (comp == null) |
| 18 | if (groupInfo == null) | |||||||||||||||||
5 | comp = new TestBeanGUI(testClass); |
| | ||||||||||||||||||
|
| 19 | groupInfo = new ThroughputInfo(); | ||||||||||||||||||
6 | testBeanGUIs.put(testClass, comp); |
| 20 | threadGroupsInfoMap.put(group, groupInfo); |
Row | Violation |
---|---|
1 | Type org.apache.jmeter.gui.JMeterGUIComponent of variable comp does not match with type org.apache.jmeter.timers.ConstantThroughputTimer.ThroughputInfo of variable groupInfo |
2 | Unmatched statement comp=new TestBeanGUI(testClass); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
3 | Unmatched statement groupInfo=new ThroughputInfo(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
4 | Type java.lang.Class of variable testClass does not match with type org.apache.jmeter.threads.ThreadGroup of variable group |