ISearchCriteria c = it2.next(); String searchCriteriaTechnicalName = c.getTechnicalName(); // execute search doExecute(ref.getSearchTerm(), p, searchCriteriaTechnicalName, ref.isSearchInside(), ref.getStartIndex(), ref.getResultCount());
FolderEvent next = (FolderEvent) folderRemovedList[swap].get(i); lastFolder = (IMailFolder) next.getSource(); TreeNode parent = lastFolder.getParent(); lastFolder.removeFromParent(); FolderTreeModel.getInstance().nodeStructureChanged(parent);
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/folder/event/FolderEventDelegator.java
Method name: void execute(IWorkerStatusController) Method name: void processTreeEvents()
Number of AST nodes: 3 Number of AST nodes: 5
1
ISearchCriteria c = it2.next();
1
FolderEvent next = (FolderEvent) folderRemovedList[swap].get(i);
2
					String searchCriteriaTechnicalName = c.getTechnicalName();
2
				lastFolder = (IMailFolder) next.getSource();
3
					// execute search
3
				
4
					doExecute(ref.getSearchTerm(), p,
5
							searchCriteriaTechnicalName, ref.isSearchInside
4
TreeNode parent = lastFolder.getParent();
6
(),
5
				lastFolder.removeFromParent();
7
							ref.getStartIndex(), ref.getResultCount());
6
				FolderTreeModel.getInstance().nodeStructureChanged(parent);
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 comparisons15
  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 fragment4
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 3
    Mapped Statements
    ID Statement ID Statement
                                                                                                                                    
    4
    FolderEvent next = (FolderEvent)folderRemovedList[swap].get(i);
                                                                                            
    5
    lastFolder = (IMailFolder)next.getSource();
                                                                                        
    6
    TreeNode parent = lastFolder.getParent();
    Preondition Violations
    Unmatched statement TreeNode parent=lastFolder.getParent(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    6
    TreeNode parent = lastFolder.getParent();
                                                                      
    7
    lastFolder.removeFromParent();
    16
    ISearchCriteria c = it2.next();
                                                                      
    17
    String searchCriteriaTechnicalName = c.getTechnicalName();
    17
    String searchCriteriaTechnicalName = c.getTechnicalName();
    Preondition Violations
    Unmatched statement String searchCriteriaTechnicalName=c.getTechnicalName(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
                                                                                                                            
    18
    doExecute(ref.getSearchTerm(), p, searchCriteriaTechnicalName, ref.isSearchInside(), ref.getStartIndex(), ref.getResultCount());
    18
    doExecute(ref.getSearchTerm(), p, searchCriteriaTechnicalName, ref.isSearchInside(), ref.getStartIndex(), ref.getResultCount());
    8
    FolderTreeModel.getInstance().nodeStructureChanged(parent);
    Differences
    Expression1Expression2Difference
    doExecutenodeStructureChangedMETHOD_INVOCATION_NAME_MISMATCH
    doExecute(ref.getSearchTerm(),p,searchCriteriaTechnicalName,ref.isSearchInside(),ref.getStartIndex(),ref.getResultCount())FolderTreeModel.getInstance().nodeStructureChanged(parent)ARGUMENT_NUMBER_MISMATCH
    FolderTreeModel.getInstance()MISSING_METHOD_INVOCATION_EXPRESSION
    Preondition Violations
    Expression doExecute(ref.getSearchTerm(),p,searchCriteriaTechnicalName,ref.isSearchInside(),ref.getStartIndex(),ref.getResultCount()) is a void method call, and thus it cannot be parameterized
    Expression FolderTreeModel.getInstance().nodeStructureChanged(parent) is a void method call, and thus it cannot be parameterized
    Expression doExecute(ref.getSearchTerm(),p,searchCriteriaTechnicalName,ref.isSearchInside(),ref.getStartIndex(),ref.getResultCount()) is a void method call, and thus it cannot be parameterized
    Expression FolderTreeModel.getInstance().nodeStructureChanged(parent) is a void method call, and thus it cannot be parameterized
    8
    FolderTreeModel.getInstance().nodeStructureChanged(parent);
    Precondition Violations (6)
    Row Violation
    1Unmatched statement TreeNode parent=lastFolder.getParent(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    2Unmatched statement String searchCriteriaTechnicalName=c.getTechnicalName(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    3Expression doExecute(ref.getSearchTerm(),p,searchCriteriaTechnicalName,ref.isSearchInside(),ref.getStartIndex(),ref.getResultCount()) is a void method call, and thus it cannot be parameterized
    4Expression FolderTreeModel.getInstance().nodeStructureChanged(parent) is a void method call, and thus it cannot be parameterized
    5Expression doExecute(ref.getSearchTerm(),p,searchCriteriaTechnicalName,ref.isSearchInside(),ref.getStartIndex(),ref.getResultCount()) is a void method call, and thus it cannot be parameterized
    6Expression FolderTreeModel.getInstance().nodeStructureChanged(parent) is a void method call, and thus it cannot be parameterized