String providerTechnicalName = ref.getProviderTechnicalName(); ISearchProvider p = getProvider(providerTechnicalName); doExecute(ref.getSearchTerm(), p, ref .getSearchCriteriaTechnicalName(), ref.isSearchInside(), ref.getStartIndex(), ref .getResultCount());
if (dialog.success()) { IMailFolder folder = (IMailFolder) dialog.getSelectedFolder(); String treePath = folder.getTreePath(); markChooseFolderButton.setText(treePath); }
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/mail/src/main/java/org/columba/mail/gui/config/account/SpamPanel.java
Method name: void execute(IWorkerStatusController) Method name: void actionPerformed(ActionEvent)
Number of AST nodes: 3 Number of AST nodes: 4
1
String providerTechnicalName = ref.getProviderTechnicalName();
2
				ISearchProvider p = getProvider(providerTechnicalName);
3
				doExecute(ref.getSearchT
1
if (dialog.success()) {
4
erm(), p, ref
2
				IMailFolder folder = (IMailFolder) dialog.getSelectedFolder()
5
						.getSearchCriteriaTechnicalName(),
6
						ref.isSearchInside(), ref.getStartIndex(), ref
7
								.getResultCount());
3
;
4
				String treePath = folder.getTreePath();
5
				markChooseFolderButton.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
    20
    String providerTechnicalName = ref.getProviderTechnicalName();
                                                                                                                                    
    21
    ISearchProvider p = getProvider(providerTechnicalName);
    21
    ISearchProvider p = getProvider(providerTechnicalName);
    11
    IMailFolder folder = (IMailFolder)dialog.getSelectedFolder();
    Differences
    Expression1Expression2Difference
    org.columba.core.search.api.ISearchProviderorg.columba.mail.folder.IMailFolderSUBCLASS_TYPE_MISMATCH
    pfolderVARIABLE_NAME_MISMATCH
    org.columba.core.search.api.ISearchProviderorg.columba.mail.folder.IMailFolderSUBCLASS_TYPE_MISMATCH
    org.columba.core.search.api.ISearchProviderorg.columba.mail.folder.IMailFolderSUBCLASS_TYPE_MISMATCH
    getProvider(providerTechnicalName)(IMailFolder)dialog.getSelectedFolder()TYPE_COMPATIBLE_REPLACEMENT
    Preondition Violations
    Expression getProvider(providerTechnicalName) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    11
    IMailFolder folder = (IMailFolder)dialog.getSelectedFolder();
                                                                                      
    12
    String treePath = folder.getTreePath();
    Preondition Violations
    Unmatched statement String treePath=folder.getTreePath(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    12
    String treePath = folder.getTreePath();
                                                                                              
    13
    markChooseFolderButton.setText(treePath);
    Preondition Violations
    Unmatched statement markChooseFolderButton.setText(treePath); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    13
    markChooseFolderButton.setText(treePath);
    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());
    Preondition Violations
    Unmatched statement doExecute(ref.getSearchTerm(),p,ref.getSearchCriteriaTechnicalName(),ref.isSearchInside(),ref.getStartIndex(),ref.getResultCount()); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
                                                                                                                                                                                                                                                                                    
    Precondition Violations (6)
    Row Violation
    1Expression getProvider(providerTechnicalName) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Unmatched statement String treePath=folder.getTreePath(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    3Unmatched statement markChooseFolderButton.setText(treePath); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    4Unmatched statement doExecute(ref.getSearchTerm(),p,ref.getSearchCriteriaTechnicalName(),ref.isSearchInside(),ref.getStartIndex(),ref.getResultCount()); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    5Clone fragment #1 returns variable p with type org.columba.core.search.api.ISearchProvider , while Clone fragment #2 returns variable folder with type org.columba.mail.folder.IMailFolder
    6The refactoring of the clones is infeasible, because classes org.columba.core.search.SearchManager.SearchCommand and org.columba.mail.gui.config.account.SpamPanel do not have a common superclass