while (it.hasNext()) {
Object temp = it.next();
data.put(temp, new ListedHashTree());
order.add(temp);
}
List comps = new LinkedList();
comps.add(mLabel);
comps.add(choiceList);
return comps;
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jorphan/collections/ListedHashTree.java
|
|
File path: /jakarta-jmeter-2.3.2/src/org/apache/jorphan/gui/JLabeledChoice.java
|
Method name: void ListedHashTree(Collection)
|
|
Method name: List getComponentList()
|
Number of AST nodes: 4
|
|
Number of AST nodes: 4
|
|
1 | while (it.hasNext()) {↵ | | |
|
2 | Object temp = it.next();↵ | | 1 | List comps = ↵
|
3 | data.put(temp, new ListedHashTree());↵ | | |
|
4 | order.add(temp);↵ | | |
|
5 | } | | 2 | new LinkedList();↵
|
| | | 3 | comps.add(mLabel);↵
|
| | | 4 | comps.add(choiceList);↵
|
| | | 5 | return comps;
|
See real code fragment |
|
See real code fragment |
Summary
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.0 |
Clones location | Clones are in different classes |
Number of node comparisons | 12 |
-
{Non-refactorable}
Mapping Summary
Number of mapped statements | 1 |
Number of unmapped statements in the first code fragment | 2 |
Number of unmapped statements in the second code fragment | 3 |
Time elapsed for statement mapping (ms) | 0.0 |
Clone type | Type 3 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
| | | 1 | List comps = new LinkedList(); |
| | | 2 | comps.add(mLabel); |
| | | 4 | return comps; |
5 | Object temp = it.next(); | | | |
6 | data.put(temp, new ListedHashTree()); | | | |
7 | order.add(temp); | | 3 | comps.add(choiceList); |
Precondition Violations (3)
Row |
Violation |
1 | Unmatched return comps; |
2 | Unmatched statement Object temp=it.next(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
3 | Type java.lang.Object of variable temp does not match with type javax.swing.JComboBox of variable choiceList |