File path: /columba-1.4-src/contact/src/main/java/org/columba/contact/gui/box/ContactList.java | File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/gui/search/ResultList.java | |||
Method name: void addAll(List
|
Method name: void addAll(List
|
|||
Number of AST nodes: 3 | Number of AST nodes: 3 | |||
1 | Iterator<IContactModelPartial> it = list.iterator();↵ | 1 | Iterator<ISearchResult> it = result.iterator();↵ | |
2 | while (it.hasNext()) {↵ | 2 | while (it.hasNext()) {↵ | |
3 | addElement(it.next());↵ | 3 | listModel.addElement(it.next());↵ | |
4 | } | 4 |
| |
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.1 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 5 |
Number of mapped statements | 1 |
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) | 2.9 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | Iterator<ISearchResult> it = result.iterator(); | |||||||||||||
1 | Iterator<IContactModelPartial> it = list.iterator(); | | |||||||||||||
2 | while (it.hasNext()) |
| 2 | while (it.hasNext()) | |||||||||||
|
| 3 | listModel.addElement(it.next()); | ||||||||||||
3 | addElement(it.next()); |
| |
Row | Violation |
---|---|
1 | Type java.util.Iterator<org.columba.addressbook.model.IContactModelPartial> of variable it does not match with type java.util.Iterator<org.columba.core.search.api.ISearchResult> of variable it |
2 | Unmatched statement listModel.addElement(it.next()); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
3 | Unmatched statement addElement(it.next()); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |