listModel = new DefaultListModel();
Iterator<ITag> it = TagManager.getInstance().getAllTags();
while (it.hasNext()) {
ITag tag = it.next();
listModel.addElement(tag);
}
listModel = new DefaultListModel();
Iterator<ITag> it = TagManager.getInstance().getAllTags();
while (it.hasNext()) {
ITag tag = it.next();
listModel.addElement(tag);
}
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/core/src/main/java/org/columba/core/gui/tagging/TagList.java
|
|
File path: /columba-1.4-src/core/src/main/java/org/columba/core/gui/tagging/TagList.java
|
Method name: void TagList()
|
|
Method name: void updateList()
|
Number of AST nodes: 5
|
|
Number of AST nodes: 5
|
|
1 | listModel = new DefaultListModel();↵ | | 1 | listModel = new DefaultListModel();↵
|
2 | Iterator<ITag> it = TagManager.getInstance().getAllTags();↵ | | 2 | Iterator<ITag> it = TagManager.getInstance().getAllTags();↵
|
3 | while (it.hasNext()) {↵ | | 3 | while (it.hasNext()) {↵
|
4 | ITag tag = it.next();↵ | | 4 | ITag tag = it.next();↵
|
5 | listModel.addElement(tag);↵ | | 5 | listModel.addElement(tag);↵
|
6 | } | | 6 | }
|
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.2 |
Clones location | Clones are in the same java file |
Number of node comparisons | 13 |
-
{Non-refactorable}
Mapping Summary
Number of mapped statements | 5 |
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) | 19.7 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
2 | listModel = new DefaultListModel(); | | 1 | listModel = new DefaultListModel(); |
3 | Iterator<ITag> it = TagManager.getInstance().getAllTags(); | | 2 | Iterator<ITag> it = TagManager.getInstance().getAllTags(); |
4 | while (it.hasNext()) | | 3 | while (it.hasNext()) |
5 | | | 4 | |
6 | listModel.addElement(tag); | | 5 | listModel.addElement(tag); |
Precondition Violations (1)
Row |
Violation |
1 | The refactoring of the clones is infeasible, because classes org.columba.core.gui.tagging.TagList and org.columba.core.gui.tagging.TagList.MyTagListener do not have a common superclass |