unseen++; } index = Collections.binarySearch(remoteDeletedUids, uid); flag.setDeleted(index >= 0); if (flag.getDeleted()) { deleted++; } index = Collections.binarySearch(remoteFlaggedUids, uid);
flagged++; } index = Collections.binarySearch(remoteRecentUids, uid); flag.setRecent(index >= 0); if (flag.getRecent()) { recent++; } index = Collections.binarySearch(remoteJunkUids, uid);
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/folder/imap/IMAPFolder.java
Method name: void synchronizeFlags(MailboxStatus) Method name: void synchronizeFlags(MailboxStatus)
Number of AST nodes: 6 Number of AST nodes: 6
1
unseen++;
1
flagged++;
2
			}
2
			}
3
			index = Collections.binarySearch(remoteDeletedUids, uid);
3
			index = Collections.binarySearch(remoteRecentUids, uid);
4
			flag.setDeleted(index >= 0);
4
			flag.setRecent(index >= 0);
5
			if (flag.getDeleted()) {
5
			if (flag.getRecent()) {
6
				deleted++;
6
				recent++;
7
			}
7
			}
8
			index = Collections.binarySearch(remoteFlaggedUids, uid);
8
			index = Collections.binarySearch(remoteJunkUids, uid);
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 the same method
Number of node comparisons14
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements5
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)1.6
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    32
    index = Collections.binarySearch(remoteDeletedUids, uid);
    32
    index = Collections.binarySearch(remoteDeletedUids, uid);
    40
    index = Collections.binarySearch(remoteRecentUids, uid);
    Differences
    Expression1Expression2Difference
    remoteDeletedUidsremoteRecentUidsVARIABLE_NAME_MISMATCH
    40
    index = Collections.binarySearch(remoteRecentUids, uid);
    33
    flag.setDeleted(index >= 0);
    33
    flag.setDeleted(index >= 0);
    41
    flag.setRecent(index >= 0);
    Differences
    Expression1Expression2Difference
    setDeletedsetRecentMETHOD_INVOCATION_NAME_MISMATCH
    Preondition Violations
    Expression flag.setDeleted(index >= 0) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression flag.setRecent(index >= 0) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression flag.setDeleted(index >= 0) is a void method call, and thus it cannot be parameterized
    Expression flag.setRecent(index >= 0) is a void method call, and thus it cannot be parameterized
    41
    flag.setRecent(index >= 0);
    34
    if (flag.getDeleted())
    34
    if (flag.getDeleted())
    42
    if (flag.getRecent())
    Differences
    Expression1Expression2Difference
    getDeletedgetRecentMETHOD_INVOCATION_NAME_MISMATCH
    42
    if (flag.getRecent())
    35
    deleted++;
    35
    deleted++;
    43
    recent++;
    Differences
    Expression1Expression2Difference
    deletedrecentVARIABLE_NAME_MISMATCH
    43
    recent++;
    36
    index = Collections.binarySearch(remoteFlaggedUids, uid);
    36
    index = Collections.binarySearch(remoteFlaggedUids, uid);
    44
    index = Collections.binarySearch(remoteJunkUids, uid);
    Differences
    Expression1Expression2Difference
    remoteFlaggedUidsremoteJunkUidsVARIABLE_NAME_MISMATCH
    44
    index = Collections.binarySearch(remoteJunkUids, uid);
    Precondition Violations (5)
    Row Violation
    1Expression flag.setDeleted(index >= 0) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression flag.setRecent(index >= 0) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Expression flag.setDeleted(index >= 0) is a void method call, and thus it cannot be parameterized
    4Expression flag.setRecent(index >= 0) is a void method call, and thus it cannot be parameterized
    5Clone fragment #1 returns variables index, deleted , while Clone fragment #2 returns variables index, recent