if (attributesElement != null) {
List list = attributesElement.getAttributes();
for (int i=0; i<list.size(); i++) {
Attribute a = (Attribute) list.get(i);
attributes.put(a.getName(), a.getValue());
}
}
for (int i = 0; i < count(); i++) {
AccountItem item = get(i);
Identity identity = item.getIdentity();
String str = identity.getAddress().toString();
if (address.indexOf(str) != -1) {
// found match
return item;
}
}
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/core/src/main/java/org/columba/core/plugin/ExtensionXMLParser.java
|
|
File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/config/AccountList.java
|
Method name: ExtensionMetadata parseExtensionMetadata(Element)
|
|
Method name: AccountItem getAccount(String)
|
Number of AST nodes: 5
|
|
Number of AST nodes: 6
|
|
1 | if (attributesElement != null) {↵ | | |
|
2 | List list = attributesElement.getAttributes();↵ | | |
|
3 | for (int i=0; i<list.size(); i++) {↵ | | |
|
4 | Attribute a = (Attribute) list.get(i);↵ | | |
|
5 | attributes.put(a.getName(), a.getValue());↵ | | |
|
6 | }↵ | | |
|
7 | ↵ | | 1 | for (int i = 0; i < count(); i++) {↵
|
| | | 2 | AccountItem item = get(i);↵
|
| | | 3 | Identity identity = item.getIdentity();↵
|
| | | 4 | String str = identity.getAddress().toString();↵
|
| | | 5 | if (address.indexOf(str) != -1) {↵
|
| | | 6 | // found match↵
|
| | | 7 | return item;↵
|
| | | 8 | }↵
|
8 | } | | 9 | }
|
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 |