try {
JMeterGUIComponent comp = getGuiFromCache(guiClass, testClass);
comp.clearGui();
TestElement node = comp.createTestElement();
nodesToGui.put(node, comp);
return node;
} catch (Exception e) {
log.error("Problem retrieving gui", e);
return null;
}
try {
JMeterGUIComponent comp = getGuiFromCache(guiClass, testClass);
comp.clearGui();
TestElement node = comp.createTestElement();
nodesToGui.put(node, comp);
return node;
} catch (Exception e) {
log.error("Problem retrieving gui", e);
return null;
}
Clone fragments detected by clone detection tool
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/gui/ReportGuiPackage.java
|
Method name: TestElement createTestElement(Class, Class)
|
|
Method name: TestElement createTestElement(Class, Class)
|
Number of AST nodes: 6
|
|
Number of AST nodes: 6
|
|
1 | try {↵ | | 1 | try {↵
|
2 | JMeterGUIComponent comp = getGuiFromCache(guiClass, testClass);↵ | | 2 | JMeterGUIComponent comp = getGuiFromCache(guiClass, testClass);↵
|
3 | comp.clearGui();↵ | | 3 | comp.clearGui();↵
|
4 | TestElement node = comp.createTestElement();↵ | | 4 | TestElement node = comp.createTestElement();↵
|
5 | nodesToGui.put(node, comp);↵ | | 5 | nodesToGui.put(node, comp);↵
|
6 | return node;↵ | | 6 | return node;↵
|
7 | } catch (Exception e) {↵ | | 7 | } catch (Exception e) {↵
|
8 | log.error("Problem retrieving gui", e);↵ | | 8 | log.error("Problem retrieving gui", e);↵
|
9 | return null;↵ | | 9 | return null;↵
|
10 | } | | 10 | }
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.2 |
Clones location | Clones are in different classes |
Number of node comparisons | 36 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 6 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 2.6 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | try | | 1 | try |
2 | JMeterGUIComponent comp = getGuiFromCache(guiClass, testClass); | | 2 | JMeterGUIComponent comp = getGuiFromCache(guiClass, testClass); |
3 | | | 3 | |
4 | TestElement node = comp.createTestElement(); | | 4 | TestElement node = comp.createTestElement(); |
5 | nodesToGui.put(node, comp); | | 5 | nodesToGui.put(node, comp); |
6 | | | 6 | |
Precondition Violations (0)
Row |
Violation |