addValue(cmd, "-keystore"); String loc; File keystoreFile = getProject().resolveFile(keystore); if (keystoreFile.exists()) { loc = keystoreFile.getPath(); } else { // must be a URL - just pass as is loc = keystore; } addValue(cmd, loc);
if (splitJunit) { Path path = new Path(getProject()); path.add(antRuntimeClasses); path.add(getCommandline().getClasspath()); mirrorLoader = new SplitLoader(myLoader, path); } else { mirrorLoader = myLoader; }
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/AbstractJarSignerTask.java File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java
Method name: void bindToKeystore(ExecTask) Method name: void execute()
Number of AST nodes: 7 Number of AST nodes: 6
1
addValue(cmd, "-keystore");
2
            String loc;
3
            File keystoreFile = getProject().resolveFile(keystore);
4
            if (keystoreFile.exists
1
if (splitJunit) {
2
            Path path = new Path(getProject());
3
            path.add(antRuntimeClasses);
5
()) {
4
            path.add(getCommandline().getClasspath());
6
                loc = keystoreFile.getPath();
5
            mirrorLoader = new SplitLoader(myLoader, path);
7
            } else {
6
        } else {
8
                // must be a URL - just pass as is
7
            
9
                loc = keystore;
10
            }
11
            addValue(cmd, loc);
8
mirrorLoader = myLoader;
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 different classes having the same super class
Number of node comparisons18
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements1
    Number of unmapped statements in the first code fragment6
    Number of unmapped statements in the second code fragment5
    Time elapsed for statement mapping (ms)12.2
    Clone typeType 3
    Mapped Statements
    ID Statement ID Statement
    2
    addValue(cmd, "-keystore");
                                                              
    3
    String loc;
                                
    4
    File keystoreFile = getProject().resolveFile(keystore);
                                                                                                                    
    5
    if (keystoreFile.exists())
    5
    if (keystoreFile.exists())
    3
    if (splitJunit)
    Differences
    Expression1Expression2Difference
    keystoreFile.exists()splitJunitTYPE_COMPATIBLE_REPLACEMENT
    3
    if (splitJunit)
                                                                            
    4
    Path path = new Path(getProject());
                                                                  
    5
    path.add(antRuntimeClasses);
                                                                                              
    6
    path.add(getCommandline().getClasspath());
    6
    loc = keystoreFile.getPath();
    6
    loc = keystoreFile.getPath();
    Preondition Violations
    Unmatched statement loc=keystoreFile.getPath(); cannot be moved, because it updates a variable modified in other unmapped statements
                                                                
    else
            
    7
    loc = keystore;
    7
    loc = keystore;
    Preondition Violations
    Unmatched statement loc=keystore; cannot be moved, because it updates a variable modified in other unmapped statements
                                    
                                                      
    8
    mirrorLoader = myLoader;
    Preondition Violations
    Unmatched statement mirrorLoader=myLoader; cannot be moved, because it updates a variable modified in other unmapped statements
    8
    mirrorLoader = myLoader;
                                                                                                  
    7
    mirrorLoader = new SplitLoader(myLoader, path);
    Preondition Violations
    Unmatched statement mirrorLoader=new SplitLoader(myLoader,path); cannot be moved, because it updates a variable modified in other unmapped statements
    7
    mirrorLoader = new SplitLoader(myLoader, path);
    8
    addValue(cmd, loc);
                                              
    Precondition Violations (4)
    Row Violation
    1Unmatched statement loc=keystoreFile.getPath(); cannot be moved, because it updates a variable modified in other unmapped statements
    2Unmatched statement loc=keystore; cannot be moved, because it updates a variable modified in other unmapped statements
    3Unmatched statement mirrorLoader=new SplitLoader(myLoader,path); cannot be moved, because it updates a variable modified in other unmapped statements
    4Unmatched statement mirrorLoader=myLoader; cannot be moved, because it updates a variable modified in other unmapped statements