if (firstSync) { firstSync = false; synchronizeFlags(status); } else { syncMailboxInfo(status); } return result;
if (isLastStep) { setCanFinish(b); } else { setCanGoNext(b); }
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/folder/imap/IMAPFolder.java File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/gui/config/accountwizard/OutgoingServerStep.java
Method name: Object[] synchronizeHeaderlist() Method name: void setCanProceed(boolean)
Number of AST nodes: 5 Number of AST nodes: 3
1
if (firstSync) {
1
if (
2
				firstSync = false;
3
				synchronizeFlags(status);
4
			} else {
5
				syncMailboxInfo(status);
6
			}
7
			return result;
2
isLastStep) {
3
                        setCanFinish(b);
4
                    } else {
5
                        setCanGoNext(b);
6
                    }
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.2
Clones locationClones are in different classes
Number of node comparisons12
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements3
    Number of unmapped statements in the first code fragment2
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)3.1
    Clone typeType 3
    Mapped Statements
    ID Statement ID Statement
    14
    if (firstSync)
    14
    if (firstSync)
    1
    if (isLastStep)
    Differences
    Expression1Expression2Difference
    firstSyncisLastStepVARIABLE_NAME_MISMATCH
    1
    if (isLastStep)
    15
    firstSync = false;
    15
    firstSync = false;
    Preondition Violations
    Unmatched statement firstSync=false; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
                                            
    16
    synchronizeFlags(status);
    16
    synchronizeFlags(status);
    2
    setCanFinish(b);
    Differences
    Expression1Expression2Difference
    statusbVARIABLE_NAME_MISMATCH
    org.columba.ristretto.imap.MailboxStatusbooleanVARIABLE_TYPE_MISMATCH
    synchronizeFlagssetCanFinishMETHOD_INVOCATION_NAME_MISMATCH
    Preondition Violations
    Type org.columba.ristretto.imap.MailboxStatus of variable status does not match with type boolean of variable b
    Expression synchronizeFlags(status) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    • Inline private method synchronizeFlags
    Expression synchronizeFlags(status) is a void method call, and thus it cannot be parameterized
    Expression setCanFinish(b) is a void method call, and thus it cannot be parameterized
    2
    setCanFinish(b);
    else
    else
    17
    syncMailboxInfo(status);
    17
    syncMailboxInfo(status);
    3
    setCanGoNext(b);
    Differences
    Expression1Expression2Difference
    statusbVARIABLE_NAME_MISMATCH
    org.columba.ristretto.imap.MailboxStatusbooleanVARIABLE_TYPE_MISMATCH
    syncMailboxInfosetCanGoNextMETHOD_INVOCATION_NAME_MISMATCH
    Preondition Violations
    Type org.columba.ristretto.imap.MailboxStatus of variable status does not match with type boolean of variable b
    Expression syncMailboxInfo(status) is a void method call, and thus it cannot be parameterized
    Expression setCanGoNext(b) is a void method call, and thus it cannot be parameterized
    3
    setCanGoNext(b);
    18
    return result;
    18
    return result;
    Preondition Violations
    Unmatched return result;
                                        
    Precondition Violations (10)
    Row Violation
    1Unmatched statement firstSync=false; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    2Type org.columba.ristretto.imap.MailboxStatus of variable status does not match with type boolean of variable b
    3Expression synchronizeFlags(status) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    4Expression synchronizeFlags(status) is a void method call, and thus it cannot be parameterized
    5Expression setCanFinish(b) is a void method call, and thus it cannot be parameterized
    6Type org.columba.ristretto.imap.MailboxStatus of variable status does not match with type boolean of variable b
    7Expression syncMailboxInfo(status) is a void method call, and thus it cannot be parameterized
    8Expression setCanGoNext(b) is a void method call, and thus it cannot be parameterized
    9Unmatched return result;
    10The refactoring of the clones is infeasible, because classes org.columba.mail.folder.imap.IMAPFolder and do not have a common superclass