for (int i = 0; i < parent.count(); i++) {
XmlElement child = parent.getElement(i);
if (child.getAttribute("name").equals(name)) {
return child;
}
}
return null;
for (int i = 0; i < parent.getChildCount(); i++) {
DefaultMutableTreeNode child = (DefaultMutableTreeNode) parent
.getChildAt(i);
if (group.equals(child.getUserObject()))
return child;
}
return null;
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/gui/config/columns/ColumnConfigDialog.java
|
|
File path: /columba-1.4-src/plugins/org.columba.chat.altura/src/org/columba/chat/command/PopulateRoasterCommand.java
|
Method name: XmlElement findColumn(XmlElement, String)
|
|
Method name: DefaultMutableTreeNode findGroup(DefaultMutableTreeNode, RosterGroup)
|
Number of AST nodes: 5
|
|
Number of AST nodes: 5
|
|
1 | for (int i = 0; i < parent.count(); i++) {↵ | | 1 | for (int i = 0; i < parent.getChildCount(); i++) {↵
|
2 | XmlElement child = parent.getElemen↵ | | 2 | DefaultMutableTreeNode child = (DefaultMutableTreeNode) parent↵
|
3 | t(i);↵ | | 3 | .getChildAt(i);↵
|
|
4 | if (child.getAttribute("name").equals(name)) {↵ | | 4 | if (group.equals(child.getUserObject()))↵
|
5 | return child;↵ | | 5 | return child;↵
|
6 | }↵ | | |
|
7 | }↵ | | 6 | }↵
|
|
8 | return null; | | 7 | return null;
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 0 |
Number of refactorable cases | 0 |
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 | 1 |