File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/reporters/Summariser.java | File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/gui/ReportGuiPackage.java | |||
Method name: void threadStarted()
|
Method name: JMeterGUIComponent getGuiFromCache(Class, Class)
|
|||
Number of AST nodes: 5 | Number of AST nodes: 4 | |||
1 | synchronized (accumulators) {↵ | |||
2 | myTotals = (Totals) accumulators.get(myName);↵ | |||
3 | if (myTotals↵ | 1 | comp = (TestBeanGUI) testBeanGUIs.get(testClass);↵ | |
4 | == null){↵ | 2 | if (comp == null) {↵ | |
5 | myTotals = new Totals();↵ | |||
6 | accumulators.put(myName, myTotals);↵ | |||
7 | }↵ | |||
8 | ↵ | 3 | comp = new TestBeanGUI(testClass);↵ | |
4 | testBeanGUIs.put(testClass, comp);↵ | |||
9 | } | 5 | } | |
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.2 |
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) | 1.7 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
| 3 | comp = (TestBeanGUI)testBeanGUIs.get(testClass); | ||||||||||||||||||||||||||||
3 | myTotals = (Totals)accumulators.get(myName); |
| | ||||||||||||||||||||||||||||
4 | if (myTotals == null) |
| 4 | if (comp == null) | |||||||||||||||||||||||||||
|
| 5 | comp = new TestBeanGUI(testClass); | ||||||||||||||||||||||||||||
5 | myTotals = new Totals(); |
| | ||||||||||||||||||||||||||||
6 | accumulators.put(myName, myTotals); |
| 6 | testBeanGUIs.put(testClass, comp); |
Row | Violation |
---|---|
1 | Unmatched statement comp=(TestBeanGUI)testBeanGUIs.get(testClass); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
2 | Unmatched statement myTotals=(Totals)accumulators.get(myName); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
3 | Type org.apache.jmeter.reporters.Summariser.Totals of variable myTotals does not match with type org.apache.jmeter.gui.JMeterGUIComponent of variable comp |
4 | 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 |
5 | Unmatched statement myTotals=new Totals(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
6 | Type java.lang.String of variable myName does not match with type java.lang.Class of variable testClass |
7 | Type org.apache.jmeter.reporters.Summariser.Totals of variable myTotals does not match with type org.apache.jmeter.gui.JMeterGUIComponent of variable comp |
8 | The refactoring of the clones is infeasible, because classes org.apache.jmeter.reporters.Summariser and org.apache.jmeter.gui.ReportGuiPackage do not have a common superclass |