if (!uptodate) { createPages(); } print(1, getPageCount());
if (!active) { activate(); } return headerList.getUids();
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/core/src/main/java/org/columba/core/print/cDocument.java File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/folder/virtual/VirtualFolder.java
Method name: void print() Method name: Object[] getUids()
Number of AST nodes: 3 Number of AST nodes: 3
1
if (!uptodate) {
1
if (!
2
            createPages();
3
        }
4
        print(1, getPageCount()
2
active) {
3
			activate();
4
		}
5
);
5
		return headerList.getUids();
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
Number of node comparisons5
  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)30.2
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    if (!uptodate)
    1
    if (!uptodate)
    1
    if (!active)
    Differences
    Expression1Expression2Difference
    uptodateactiveVARIABLE_NAME_MISMATCH
    1
    if (!active)
    2
    createPages();
    2
    createPages();
    2
    activate();
    Differences
    Expression1Expression2Difference
    createPagesactivateMETHOD_INVOCATION_NAME_MISMATCH
    Preondition Violations
    Expression createPages() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    • Inline private method createPages
    Expression activate() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression createPages() is a void method call, and thus it cannot be parameterized
    Expression activate() is a void method call, and thus it cannot be parameterized
    2
    activate();
                                                                  
    3
    return headerList.getUids();
    Preondition Violations
    Unmatched statement return headerList.getUids(); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    Unmatched return headerList.getUids();
    3
    return headerList.getUids();
    3
    print(1, getPageCount());
    3
    print(1, getPageCount());
    Preondition Violations
    Unmatched statement print(1,getPageCount()); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
                                                          
    Precondition Violations (8)
    Row Violation
    1Expression createPages() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression activate() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Expression createPages() is a void method call, and thus it cannot be parameterized
    4Expression activate() is a void method call, and thus it cannot be parameterized
    5Unmatched statement return headerList.getUids(); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    6Unmatched return headerList.getUids();
    7Unmatched statement print(1,getPageCount()); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    8The refactoring of the clones is infeasible, because classes org.columba.core.print.cDocument and org.columba.mail.folder.virtual.VirtualFolder do not have a common superclass