if (encoding == null) { instream = new InputStreamReader(bis); } else { instream = new InputStreamReader(bis, encoding); }
if (encoding == null) { instream = new InputStreamReader(bis); } else { instream = new InputStreamReader(bis, encoding); }
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/LoadProperties.java File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/LoadResource.java
Method name: void execute() Method name: void execute()
Number of AST nodes: 3 Number of AST nodes: 3
1
if (encoding == null) {
1
if (encoding == null) {
2
                instream = new InputStreamReader(bis);
2
                instream = new InputStreamReader(bis);
3
            } else {
3
            } else {
4
                instream = new InputStreamReader(bis, encoding);
4
                instream = new InputStreamReader(bis, encoding);
5
            }
5
            }
Summary
Number of common nesting structure subtrees1
Number of refactorable cases1
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.1
Clones locationClones are in different classes having the same super class
Number of node comparisons10
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements3
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)0.7
    Clone typeType 1
    Mapped Statements
    ID Statement ID Statement
    13
    if (encoding == null)
    23
    if (encoding == null)
    14
    instream = new InputStreamReader(bis);
    24
    instream = new InputStreamReader(bis);
    else
    else
    15
    instream = new InputStreamReader(bis, encoding);
    25
    instream = new InputStreamReader(bis, encoding);
    Precondition Violations (0)
    Row Violation