if (child instanceof IMAPFolder) { getServer().createMailbox(child.getName(), this); } super.addSubfolder(child);
if (child instanceof IMAPFolder) { getServer().createMailbox(child.getName(), null); } super.addSubfolder(child);
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/IMAPRootFolder.java
Method name: void addSubfolder(IMailFolder) Method name: void addSubfolder(IMailFolder)
Number of AST nodes: 3 Number of AST nodes: 3
1
if (child instanceof IMAPFolder) {
1
if (child instanceof IMAPFolder) {
2
			getServer().createMailbox(child.getName(), this);
2
			getServer().createMailbox(child.getName(), null);
3
		}
3
		}
4
		super.addSubfolder(child);
4
		super.addSubfolder(child);
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 having the same super class
Number of node comparisons5
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements3
    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.7
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    if (child instanceof IMAPFolder)
    1
    if (child instanceof IMAPFolder)
    2
    getServer().createMailbox(child.getName(), this);
    2
    getServer().createMailbox(child.getName(), this);
    2
    getServer().createMailbox(child.getName(), null);
    Differences
    Expression1Expression2Difference
    thisnullTYPE_COMPATIBLE_REPLACEMENT
    2
    getServer().createMailbox(child.getName(), null);
    3
    super.addSubfolder(child);
    3
    super.addSubfolder(child);
    3
    super.addSubfolder(child);
    Preondition Violations
    Super method call super.addSubfolder(child); cannot be extracted from method
    Super method call super.addSubfolder(child); cannot be extracted from method
    3
    super.addSubfolder(child);
    Precondition Violations (2)
    Row Violation
    1Super method call super.addSubfolder(child); cannot be extracted from method
    2Super method call super.addSubfolder(child); cannot be extracted from method