c = Class.forName(objClass);
if (TestBean.class.isAssignableFrom(c)) {
comp = getGuiFromCache(TestBeanGUI.class, c);
} else {
comp = getGuiFromCache(c, null);
}
comp.clearGui();
TestElement node = comp.createTestElement();
nodesToGui.put(node, comp);
return node;
c = Class.forName(objClass);
if (TestBean.class.isAssignableFrom(c)) {
comp = getGuiFromCache(TestBeanGUI.class, c);
} else {
comp = getGuiFromCache(c, null);
}
comp.clearGui();
TestElement node = comp.createTestElement();
nodesToGui.put(node, comp);
return node;
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/gui/ReportGuiPackage.java
|
|
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/gui/GuiPackage.java
|
Method name: TestElement createTestElement(String)
|
|
Method name: TestElement createTestElement(String)
|
Number of AST nodes: 8
|
|
Number of AST nodes: 8
|
|
1 | c = Class.forName(objClass);↵ | | 1 | c = Class.forName(objClass);↵
|
2 | if (TestBean.class.isAssignableFrom(c)) {↵ | | 2 | if (TestBean.class.isAssignableFrom(c)) {↵
|
3 | comp = getGuiFromCache(TestBeanGUI.class, c);↵ | | 3 | comp = getGuiFromCache(TestBeanGUI.class, c);↵
|
4 | } else {↵ | | 4 | } else {↵
|
5 | comp = getGuiFromCache(c, null);↵ | | 5 | comp = getGuiFromCache(c, null);↵
|
6 | }↵ | | 6 | }↵
|
7 | comp.clearGui();↵ | | 7 | comp.clearGui();↵
|
8 | TestElement node = comp.createTestElement();↵ | | 8 | TestElement node = comp.createTestElement();↵
|
9 | nodesToGui.put(node, comp);↵ | | 9 | nodesToGui.put(node, comp);↵
|
10 | return node; | | 10 | return node;
|
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.4 |
Clones location | Clones are in different classes |
Number of node comparisons | 35 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 8 |
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) | 7.0 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
4 | c = Class.forName(objClass); | | 4 | c = Class.forName(objClass); |
5 | if (TestBean.class.isAssignableFrom(c)) | | 5 | if (TestBean.class.isAssignableFrom(c)) |
6 | comp = getGuiFromCache(TestBeanGUI.class, c); | | 6 | comp = getGuiFromCache(TestBeanGUI.class, c); |
| | | | |
7 | comp = getGuiFromCache(c, null); | | 7 | comp = getGuiFromCache(c, null); |
8 | comp.clearGui(); | | 8 | comp.clearGui(); |
9 | TestElement node = comp.createTestElement(); | | 9 | TestElement node = comp.createTestElement(); |
10 | nodesToGui.put(node, comp); | | 10 | nodesToGui.put(node, comp); |
11 | return node; | | 11 | return node; |
Precondition Violations (0)
Row |
Violation |