IFolder folder = dialog.getSelectedFolder(); String uid = folder.getId(); addContacts(uid, contactItems);
if (dialog.success()) { IMailFolder folder = (IMailFolder) dialog.getSelectedFolder(); String treePath = folder.getTreePath(); treePathButton.setText(treePath); }
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/contact/src/main/java/org/columba/addressbook/facade/ContactFacade.java File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/gui/config/filter/plugins/FolderChooserActionRow.java
Method name: void addContacts(IContactItem[]) Method name: void promptUserForFolder()
Number of AST nodes: 3 Number of AST nodes: 4
1
I
1
if (dialog.success()) {
2
Folder folder = dialog.getSelectedFolder();
2
			IMailFolder folder = (IMailFolder) dialog.getSelectedFolder();
3
			String uid = folder.getId();
3
			String treePath = folder.get
4
			addContacts(uid, contactItems);
4
TreePath();
5
			treePathButton.setText(treePath);
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.0
Clones locationClones are in different classes
Number of node comparisons9
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements1
    Number of unmapped statements in the first code fragment2
    Number of unmapped statements in the second code fragment2
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
                                                                                                                                
    3
    IMailFolder folder = (IMailFolder)dialog.getSelectedFolder();
                                                                                    
    4
    String treePath = folder.getTreePath();
    6
    IFolder folder = dialog.getSelectedFolder();
                                                                                              
    7
    String uid = folder.getId();
                                                              
    8
    addContacts(uid, contactItems);
    8
    addContacts(uid, contactItems);
    5
    treePathButton.setText(treePath);
    Differences
    Expression1Expression2Difference
    addContactssetTextMETHOD_INVOCATION_NAME_MISMATCH
    addContacts(uid,contactItems)treePathButton.setText(treePath)ARGUMENT_NUMBER_MISMATCH
    treePathButtonMISSING_METHOD_INVOCATION_EXPRESSION
    Preondition Violations
    Expression addContacts(uid,contactItems) is a void method call, and thus it cannot be parameterized
    Expression treePathButton.setText(treePath) is a void method call, and thus it cannot be parameterized
    Expression addContacts(uid,contactItems) is a void method call, and thus it cannot be parameterized
    Expression treePathButton.setText(treePath) is a void method call, and thus it cannot be parameterized
    5
    treePathButton.setText(treePath);
    Precondition Violations (4)
    Row Violation
    1Expression addContacts(uid,contactItems) is a void method call, and thus it cannot be parameterized
    2Expression treePathButton.setText(treePath) is a void method call, and thus it cannot be parameterized
    3Expression addContacts(uid,contactItems) is a void method call, and thus it cannot be parameterized
    4Expression treePathButton.setText(treePath) is a void method call, and thus it cannot be parameterized