data.registerDataLookup("Location.source", new DataLookup() { public Object lookupData() { return sourceFile; } }); data.registerDataLookup("Location.destination", new DataLookup() { public Object lookupData() { return destinationFolder; } }); setCanGoNext(false);
data.registerDataLookup("Location.source", new DataLookup() { public Object lookupData() { return sourceFiles; } }); data.registerDataLookup("Location.destination", new DataLookup() { public Object lookupData() { return destinationFolder; } }); setCanGoNext(false);
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/contact/src/main/java/org/columba/addressbook/gui/dialog/importfilter/LocationStep.java File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/gui/config/mailboximport/LocationStep.java
Method name: void LocationStep(DataModel) Method name: void LocationStep(IFrameMediator, DataModel)
Number of AST nodes: 3 Number of AST nodes: 3
1
data.registerDataLookup("Location.source",
1
data.registerDataLookup("Location.source",
2
            new DataLookup() {
2
            new DataLookup() {
3
                public Object lookupData() {
3
                public Object lookupData() {
4
                    return sourceFile;
4
                    return sourceFiles;
5
                }
5
                }
6
            });
6
            });
7
        data.registerDataLookup("Location.destination",
7
        data.registerDataLookup("Location.destination",
8
            new DataLookup() {
8
            new DataLookup() {
9
                public Object lookupData() {
9
                public Object lookupData() {
10
                    return destinationFolder;
10
                    return destinationFolder;
11
                }
11
                }
12
            });
12
            });
13
        setCanGoNext(false);
13
        setCanGoNext(false);
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.0
Clones locationClones are in different classes having the same super class
Number of node comparisons9
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements2
    Number of unmapped statements in the first code fragment1
    Number of unmapped statements in the second code fragment1
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
                                                                                                                                                                                                                                                              
    3
    data.registerDataLookup("Location.source", new DataLookup() {...});
    2
    data.registerDataLookup("Location.source", new DataLookup() {...});
    2
    data.registerDataLookup("Location.source", new DataLookup() {...});
    5
    setCanGoNext(false);
    Differences
    Expression1Expression2Difference
    registerDataLookupsetCanGoNextMETHOD_INVOCATION_NAME_MISMATCH
    data.registerDataLookup("Location.source",new DataLookup(){ public Object lookupData(){ return sourceFile; } } )setCanGoNext(false)ARGUMENT_NUMBER_MISMATCH
    dataMISSING_METHOD_INVOCATION_EXPRESSION
    Preondition Violations
    Expression data.registerDataLookup("Location.source",new DataLookup(){ public Object lookupData(){ return sourceFile; } } ) is a void method call, and thus it cannot be parameterized
    Expression setCanGoNext(false) is a void method call, and thus it cannot be parameterized
    Expression data.registerDataLookup("Location.source",new DataLookup(){ public Object lookupData(){ return sourceFile; } } ) is a void method call, and thus it cannot be parameterized
    Expression setCanGoNext(false) is a void method call, and thus it cannot be parameterized
    5
    setCanGoNext(false);
    3
    data.registerDataLookup("Location.destination", new DataLookup() {...});
                                                                                                                                                                                                                                                                                    
    4
    setCanGoNext(false);
    4
    setCanGoNext(false);
    4
    data.registerDataLookup("Location.destination", new DataLookup() {...});
    Differences
    Expression1Expression2Difference
    setCanGoNextregisterDataLookupMETHOD_INVOCATION_NAME_MISMATCH
    setCanGoNext(false)data.registerDataLookup("Location.destination",new DataLookup(){ public Object lookupData(){ return destinationFolder; } } )ARGUMENT_NUMBER_MISMATCH
    dataMISSING_METHOD_INVOCATION_EXPRESSION
    Preondition Violations
    Expression setCanGoNext(false) is a void method call, and thus it cannot be parameterized
    Expression data.registerDataLookup("Location.destination",new DataLookup(){ public Object lookupData(){ return destinationFolder; } } ) is a void method call, and thus it cannot be parameterized
    Expression setCanGoNext(false) is a void method call, and thus it cannot be parameterized
    Expression data.registerDataLookup("Location.destination",new DataLookup(){ public Object lookupData(){ return destinationFolder; } } ) is a void method call, and thus it cannot be parameterized
    4
    data.registerDataLookup("Location.destination", new DataLookup() {...});
    Precondition Violations (8)
    Row Violation
    1Expression data.registerDataLookup("Location.source",new DataLookup(){ public Object lookupData(){ return sourceFile; } } ) is a void method call, and thus it cannot be parameterized
    2Expression setCanGoNext(false) is a void method call, and thus it cannot be parameterized
    3Expression data.registerDataLookup("Location.source",new DataLookup(){ public Object lookupData(){ return sourceFile; } } ) is a void method call, and thus it cannot be parameterized
    4Expression setCanGoNext(false) is a void method call, and thus it cannot be parameterized
    5Expression setCanGoNext(false) is a void method call, and thus it cannot be parameterized
    6Expression data.registerDataLookup("Location.destination",new DataLookup(){ public Object lookupData(){ return destinationFolder; } } ) is a void method call, and thus it cannot be parameterized
    7Expression setCanGoNext(false) is a void method call, and thus it cannot be parameterized
    8Expression data.registerDataLookup("Location.destination",new DataLookup(){ public Object lookupData(){ return destinationFolder; } } ) is a void method call, and thus it cannot be parameterized