Parameter[] params = getParameters(); if (params != null) { for (int i = 0; i < params.length; i++) { if (PREFIX_KEY.equals(params[i].getName())) { prefix = params[i].getValue(); break; } } }
if (params != null) { for (int i = 0; i < params.length; i++) { if (CONTAINS_KEY.equals(params[i].getType())) { contains.addElement(params[i].getValue()); } else if (NEGATE_KEY.equals(params[i].getType())) { setNegate(Project.toBoolean(params[i].getValue())); } } }
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/filters/PrefixLines.java File path: /apache-ant-1.7.0/src/org/apache/tools/ant/filters/LineContains.java
Method name: void initialize() Method name: void initialize()
Number of AST nodes: 6 Number of AST nodes: 6
1
Parameter[] params = getParameters();
2
        if (params != null) {
1
if (params != null) {
3
            for (int i = 0; i < params.length; i++) {
2
            for (int i = 0; i < params.length; i++) {
4
                if (PREFIX_KEY.equals(params[i].getName())) {
3
                if (CONTAINS_KEY.equals(params[i].getType())) {
5
                    prefix = params[i].getValue();
4
                    contains.addElement(params[i].getValue());
6
                    break
5
                } else if (NEGATE_KEY.equals(params[i].getType())) {
7
;
6
                    setNegate(Project.toBoolean(params[i].getValue()));
8
                }
7
                }
9
            }
8
            }
10
        }
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.3
Clones locationClones are in different classes having the same super class
Number of node comparisons2