String providerTechnicalName = ref.getProviderTechnicalName(); ISearchProvider p = getProvider(providerTechnicalName); doExecute(ref.getSearchTerm(), p, ref .getSearchCriteriaTechnicalName(), ref.isSearchInside(), ref.getStartIndex(), ref .getResultCount());
IFolder folder = dialog.getSelectedFolder(); String uid = folder.getId(); addContact(uid, contactItem);
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/core/src/main/java/org/columba/core/search/SearchManager.java File path: /columba-1.4-src/contact/src/main/java/org/columba/addressbook/facade/ContactFacade.java
Method name: void execute(IWorkerStatusController) Method name: void addContact(IContactItem)
Number of AST nodes: 3 Number of AST nodes: 3
1
String providerTechnicalName = ref.getProviderTechnicalName();
2
				ISearchProvider p = getProvider(providerTechnicalName);
3
				doExecute(ref.getSearchTerm(), p, ref
4
						.getSearchCriteriaTechnicalName(),
5
						ref.isSearchInside(), ref.getS
1
IFolder folder = dialog.getSelectedFolder();
2
			String uid = folder.getId();
6
tartIndex(), ref
3
			addContact(uid, contactI
7
								.getResultCount());
4
tem);
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
                                                                                              
    6
    IFolder folder = dialog.getSelectedFolder();
                                                              
    7
    String uid = folder.getId();
    20
    String providerTechnicalName = ref.getProviderTechnicalName();
                                                                                                                                    
    21
    ISearchProvider p = getProvider(providerTechnicalName);
    21
    ISearchProvider p = getProvider(providerTechnicalName);
    Preondition Violations
    Unmatched statement ISearchProvider p=getProvider(providerTechnicalName); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
                                                                                                                      
    22
    doExecute(ref.getSearchTerm(), p, ref.getSearchCriteriaTechnicalName(), ref.isSearchInside(), ref.getStartIndex(), ref.getResultCount());
    22
    doExecute(ref.getSearchTerm(), p, ref.getSearchCriteriaTechnicalName(), ref.isSearchInside(), ref.getStartIndex(), ref.getResultCount());
    8
    addContact(uid, contactItem);
    Differences
    Expression1Expression2Difference
    doExecuteaddContactMETHOD_INVOCATION_NAME_MISMATCH
    doExecute(ref.getSearchTerm(),p,ref.getSearchCriteriaTechnicalName(),ref.isSearchInside(),ref.getStartIndex(),ref.getResultCount())addContact(uid,contactItem)ARGUMENT_NUMBER_MISMATCH
    Preondition Violations
    Expression doExecute(ref.getSearchTerm(),p,ref.getSearchCriteriaTechnicalName(),ref.isSearchInside(),ref.getStartIndex(),ref.getResultCount()) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    • Inline private method doExecute
    Expression addContact(uid,contactItem) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression doExecute(ref.getSearchTerm(),p,ref.getSearchCriteriaTechnicalName(),ref.isSearchInside(),ref.getStartIndex(),ref.getResultCount()) is a void method call, and thus it cannot be parameterized
    Expression addContact(uid,contactItem) is a void method call, and thus it cannot be parameterized
    Expression doExecute(ref.getSearchTerm(),p,ref.getSearchCriteriaTechnicalName(),ref.isSearchInside(),ref.getStartIndex(),ref.getResultCount()) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    • Inline private method doExecute
    Expression addContact(uid,contactItem) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression doExecute(ref.getSearchTerm(),p,ref.getSearchCriteriaTechnicalName(),ref.isSearchInside(),ref.getStartIndex(),ref.getResultCount()) is a void method call, and thus it cannot be parameterized
    Expression addContact(uid,contactItem) is a void method call, and thus it cannot be parameterized
    8
    addContact(uid, contactItem);
    Precondition Violations (10)
    Row Violation
    1Unmatched statement ISearchProvider p=getProvider(providerTechnicalName); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    2Expression doExecute(ref.getSearchTerm(),p,ref.getSearchCriteriaTechnicalName(),ref.isSearchInside(),ref.getStartIndex(),ref.getResultCount()) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Expression addContact(uid,contactItem) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    4Expression doExecute(ref.getSearchTerm(),p,ref.getSearchCriteriaTechnicalName(),ref.isSearchInside(),ref.getStartIndex(),ref.getResultCount()) is a void method call, and thus it cannot be parameterized
    5Expression addContact(uid,contactItem) is a void method call, and thus it cannot be parameterized
    6Expression doExecute(ref.getSearchTerm(),p,ref.getSearchCriteriaTechnicalName(),ref.isSearchInside(),ref.getStartIndex(),ref.getResultCount()) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    7Expression addContact(uid,contactItem) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    8Expression doExecute(ref.getSearchTerm(),p,ref.getSearchCriteriaTechnicalName(),ref.isSearchInside(),ref.getStartIndex(),ref.getResultCount()) is a void method call, and thus it cannot be parameterized
    9Expression addContact(uid,contactItem) is a void method call, and thus it cannot be parameterized
    10The refactoring of the clones is infeasible, because classes org.columba.core.search.SearchManager.SearchCommand and org.columba.addressbook.facade.ContactFacade do not have a common superclass