pkFile = primaryKey.getClassFile(buildDir); modified = pkFile.lastModified(); if (modified == -1) { System.out.println("The class " + primaryKey.getQualifiedClassName() + "couldn't be " + "found on the classpath"); return -1; }
remoteFile = remote.getClassFile(buildDir); modified = remoteFile.lastModified(); if (modified == -1) { System.out.println("The class " + remote.getQualifiedClassName() + " couldn't " + "be found on the classpath"); return -1; }
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/ejb/IPlanetEjbc.java File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/ejb/IPlanetEjbc.java
Method name: long sourceClassesModified(File) Method name: long sourceClassesModified(File)
Number of AST nodes: 5 Number of AST nodes: 5
1
pkFile = primaryKey.getClassFile(buildDir);
1
remoteFile = remote.getClassFile(buildDir);
2
                modified = pkFile.lastModified();
2
            modified = remoteFile.lastModified();
3
                if (modified == -1) {
3
            if (modified == -1) {
4
                    System.out.println("The class "
4
                System.out.println("The class "
5
                                    + primaryKey.getQualifiedClassName() + "couldn't be "
5
                                + remote.getQualifiedClassName() + " couldn't 
6
    
6
"
7
                                + "found on the classpath");
7
                                + "be found on the classpath");
8
                    return -1;
8
                return -1;
9
                }
9
            }
Summary
Number of common nesting structure subtrees1
Number of refactorable cases0
Number of non-refactorable cases1
Time elapsed for finding largest common nesting structure subtrees (ms)0.1
Clones locationClones are in the same method
Number of node comparisons13
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements5
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)2.9
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    20
    pkFile = primaryKey.getClassFile(buildDir);
    20
    pkFile = primaryKey.getClassFile(buildDir);
    7
    remoteFile = remote.getClassFile(buildDir);
    Differences
    Expression1Expression2Difference
    pkFileremoteFileVARIABLE_NAME_MISMATCH
    primaryKeyremoteVARIABLE_NAME_MISMATCH
    7
    remoteFile = remote.getClassFile(buildDir);
    21
    modified = pkFile.lastModified();
    21
    modified = pkFile.lastModified();
    8
    modified = remoteFile.lastModified();
    Differences
    Expression1Expression2Difference
    pkFileremoteFileVARIABLE_NAME_MISMATCH
    8
    modified = remoteFile.lastModified();
    22
    if (modified == -1)
    9
    if (modified == -1)
    23
    System.out.println("The class " + primaryKey.getQualifiedClassName() + "couldn't be " + "found on the classpath");
    23
    System.out.println("The class " + primaryKey.getQualifiedClassName() + "couldn't be " + "found on the classpath");
    10
    System.out.println("The class " + remote.getQualifiedClassName() + " couldn't " + "be found on the classpath");
    Differences
    Expression1Expression2Difference
    "couldn't be "" couldn't "LITERAL_VALUE_MISMATCH
    "found on the classpath""be found on the classpath"LITERAL_VALUE_MISMATCH
    primaryKeyremoteVARIABLE_NAME_MISMATCH
    10
    System.out.println("The class " + remote.getQualifiedClassName() + " couldn't " + "be found on the classpath");
    24
    return -1;
    11
    return -1;
    Precondition Violations (2)
    Row Violation
    1Clone fragment #1 returns variables modified, pkFile , while Clone fragment #2 returns variables modified, remoteFile
    2Not all possible execution flows end in a return statement