if (canonicalize) { parentPath = new JRubyFile(parent).getCanonicalPath().toString(); } else { parentPath = new JRubyFile(parent).toString(); }
if (canonicalize) { classPath = new JRubyFile(filename).getCanonicalPath().toString(); } else { classPath = new JRubyFile(filename).toString(); }
Clone fragments detected by clone detection tool
File path: /jruby-1.4.0/src/org/jruby/util/JavaNameMangler.java File path: /jruby-1.4.0/src/org/jruby/util/JavaNameMangler.java
Method name: String mangleFilenameForClasspath(String, String, String, boolean) Method name: String mangleFilenameForClasspath(String, String, String, boolean)
Number of AST nodes: 3 Number of AST nodes: 3
1
if (canonicalize) {
1
if (canonicalize) {
2
                        parentPath = new JRubyFile(parent).getCanonicalPath().toString();
2
                        classPath = new JRubyFile(filename).getCanonicalPath().toString();
3
                    } else {
3
                    } else {
4
                        parentPath = new JRubyFile(parent).toString();
4
                        classPath = new JRubyFile(filename).toString();
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.2
Clones locationClones are in the same method
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)1.1
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    15
    if (canonicalize)
    9
    if (canonicalize)
    16
    parentPath = new JRubyFile(parent).getCanonicalPath().toString();
    16
    parentPath = new JRubyFile(parent).getCanonicalPath().toString();
    10
    classPath = new JRubyFile(filename).getCanonicalPath().toString();
    Differences
    Expression1Expression2Difference
    parentPathclassPathVARIABLE_NAME_MISMATCH
    parentfilenameVARIABLE_NAME_MISMATCH
    10
    classPath = new JRubyFile(filename).getCanonicalPath().toString();
    else
    else
    17
    parentPath = new JRubyFile(parent).toString();
    17
    parentPath = new JRubyFile(parent).toString();
    11
    classPath = new JRubyFile(filename).toString();
    Differences
    Expression1Expression2Difference
    parentPathclassPathVARIABLE_NAME_MISMATCH
    parentfilenameVARIABLE_NAME_MISMATCH
    11
    classPath = new JRubyFile(filename).toString();
    Precondition Violations (0)
    Row Violation