HADBColumnTest test = new HADBColumnTest(); test.doTest(); test.shutdown();
PointbaseBLOBTest test = new PointbaseBLOBTest(); test.doTest(); test.shutdown();
Clone fragments detected by clone detection tool
File path: /sql12/plugins/dbcopy/test/adhoc/HADBColumnTest.java File path: /sql12/plugins/dbcopy/test/adhoc/MySQLDecimalTest.java
Method name: void main(String[]) Method name: void main(String[])
Number of AST nodes: 3 Number of AST nodes: 3
1
HADBColumnTest test = new HADBColumnTest();
1
PointbaseBLOBTest test = new PointbaseBLOBTest();
2
        
2
        
3
        test.doTest();
3
        test.doTest();
4
        
4
        
5
        test.shutdown();
5
        test.shutdown();
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
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
                                                                                                        
    1
    PointbaseBLOBTest test = new PointbaseBLOBTest();
    Preondition Violations
    Unmatched statement PointbaseBLOBTest test=new PointbaseBLOBTest(); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    1
    PointbaseBLOBTest test = new PointbaseBLOBTest();
    1
    HADBColumnTest test = new HADBColumnTest();
    1
    HADBColumnTest test = new HADBColumnTest();
    Preondition Violations
    Unmatched statement HADBColumnTest test=new HADBColumnTest(); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
                                                                                            
    2
    test.doTest();
    2
    test.doTest();
    2
    test.doTest();
    Differences
    Expression1Expression2Difference
    adhoc.HADBColumnTestadhoc.PointbaseBLOBTestVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type adhoc.HADBColumnTest of variable test does not match with type adhoc.PointbaseBLOBTest of variable test
    • Make classes adhoc.HADBColumnTest and adhoc.PointbaseBLOBTest extend a common superclass
    2
    test.doTest();
    3
    test.shutdown();
    3
    test.shutdown();
    3
    test.shutdown();
    Differences
    Expression1Expression2Difference
    adhoc.HADBColumnTestadhoc.PointbaseBLOBTestVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type adhoc.HADBColumnTest of variable test does not match with type adhoc.PointbaseBLOBTest of variable test
    • Make classes adhoc.HADBColumnTest and adhoc.PointbaseBLOBTest extend a common superclass
    3
    test.shutdown();
    Precondition Violations (4)
    Row Violation
    1Unmatched statement PointbaseBLOBTest test=new PointbaseBLOBTest(); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    2Unmatched statement HADBColumnTest test=new HADBColumnTest(); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    3Type adhoc.HADBColumnTest of variable test does not match with type adhoc.PointbaseBLOBTest of variable test
    4Type adhoc.HADBColumnTest of variable test does not match with type adhoc.PointbaseBLOBTest of variable test