String arg = e.nextElement().toString(); if (other.getUserProperty(arg) != null) { continue; } Object value = inheritedProperties.get(arg); other.setInheritedProperty(arg, value.toString());
Object arg = e.nextElement(); if (inheritedProperties.containsKey(arg)) { continue; } Object value = userProperties.get(arg); other.setUserProperty(arg.toString(), value.toString());
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/PropertyHelper.java File path: /apache-ant-1.7.0/src/org/apache/tools/ant/PropertyHelper.java
Method name: void copyInheritedProperties(Project) Method name: void copyUserProperties(Project)
Number of AST nodes: 5 Number of AST nodes: 5
1
String arg = e.nextElement().toString();
1
Object arg = e.nextElement();
2
            if (other.getUserProperty(arg) != null) {
2
            if (inheritedProperties.containsKey(arg)) {
3
                continue;
3
                continue;
4
            }
4
            }
5
            Object value = inheritedProperties.get(arg);
5
            Object value = userProperties.get(arg);
6
            other.setInheritedProperty(arg, value.toString());
6
            other.setUserProperty(arg.toString(), value.toString());
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.1
Clones locationClones are declared in the same class
Number of node comparisons1