JMenu addMenu = new JMenu(label);
for (int i = 0; i < categories.length; i++) {
addMenu.add(makeMenu(categories[i], actionCommand));
}
return addMenu;
JMenu addMenu = new JMenu(label);
for (int i = 0; i < categories.length; i++) {
addMenu.add(makeMenu(categories[i], actionCommand));
}
return addMenu;
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/gui/util/MenuFactory.java
|
|
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/gui/util/ReportMenuFactory.java
|
Method name: JMenu makeMenus(String[], String, String)
|
|
Method name: JMenu makeMenus(String[], String, String)
|
Number of AST nodes: 4
|
|
Number of AST nodes: 4
|
|
1 | JMenu addMenu = new JMenu(label);↵ | | 1 | JMenu addMenu = new JMenu(label);↵
|
2 | for (int i = 0; i < categories.length; i++) {↵ | | 2 | for (int i = 0; i < categories.length; i++) {↵
|
3 | addMenu.add(makeMenu(categories[i], actionCommand));↵ | | 3 | addMenu.add(makeMenu(categories[i], actionCommand));↵
|
4 | }↵ | | 4 | }↵
|
5 | return addMenu; | | 5 | return addMenu;
|
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 | 6 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 4 |
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.6 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | JMenu addMenu = new JMenu(label); | | 1 | JMenu addMenu = new JMenu(label); |
2 | for (int i = 0; i < categories.length; i++) | | 2 | for (int i = 0; i < categories.length; i++) |
3 | addMenu.add(makeMenu(categories[i], actionCommand)); | | 3 | addMenu.add(makeMenu(categories[i], actionCommand)); |
4 | return addMenu; | | 4 | return addMenu; |
Precondition Violations (0)
Row |
Violation |