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
        }
Summary
Number of common nesting structure subtrees0
Number of refactorable cases0
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.0
Clones locationClones are in different classes
Number of node comparisons1