if (aComponent.equals(headerController.getView() .getCcComboBox())) return headerController.getView().getBccComboBox(); else if (aComponent.equals(headerController.getView() .getBccComboBox())) return subjectController.getView(); else if (aComponent.equals(subjectController.getView())) return currentEditorController.getComponent();
if (aComponent.equals(headerController.getView() .getCcComboBox())) return headerController.getView().getToComboBox(); else if (aComponent.equals(headerController.getView() .getToComboBox())) return priorityController.getView(); else if (aComponent.equals(priorityController.getView())) return accountController.getView();
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/gui/composer/ComposerController.java File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/gui/composer/ComposerController.java
Method name: Component getComponentAfter(Container, Component) Method name: Component getComponentBefore(Container, Component)
Number of AST nodes: 6 Number of AST nodes: 6
1
if (aComponent.equals(headerController.getView()
1
if (aComponent.equals(headerController.getView()
2
					.getCcComboBox()))
2
					.getCcComboBox()))
3
				return headerController.getView().getBccComboBox();
3
				return headerController.getView().getToComboBox();
4
			else if (aComponent.equals(headerController.getView()
4
			else if (aComponent.equals(headerController.getView()
5
					.getBccComboBox()))
5
					.getToComboBox()))
6
				return subjectController.getView();
6
				return priorityController.getView();
7
			else if (aComponent.equals(subjectController.getView()))
7
			else if (aComponent.equals(priorityController.getView()))
8
				return currentEditorController.getComponent();
8
				return accountController.getView();
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)1.2
Clones locationClones are declared in the same class
Number of node comparisons27
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements5
    Number of unmapped statements in the first code fragment1
    Number of unmapped statements in the second code fragment1
    Time elapsed for statement mapping (ms)1.3
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    7
    else if (aComponent.equals(headerController.getView().getCcComboBox()))
    7
    else if (aComponent.equals(headerController.getView().getCcComboBox()))
    8
    return headerController.getView().getBccComboBox();
    8
    return headerController.getView().getBccComboBox();
    8
    return headerController.getView().getToComboBox();
    Differences
    Expression1Expression2Difference
    getBccComboBoxgetToComboBoxMETHOD_INVOCATION_NAME_MISMATCH
    8
    return headerController.getView().getToComboBox();
    9
    else if (aComponent.equals(headerController.getView().getBccComboBox()))
    9
    else if (aComponent.equals(headerController.getView().getBccComboBox()))
    9
    else if (aComponent.equals(headerController.getView().getToComboBox()))
    Differences
    Expression1Expression2Difference
    getBccComboBoxgetToComboBoxMETHOD_INVOCATION_NAME_MISMATCH
    9
    else if (aComponent.equals(headerController.getView().getToComboBox()))
    10
    return subjectController.getView();
    10
    return subjectController.getView();
    10
    return priorityController.getView();
    Differences
    Expression1Expression2Difference
    subjectControllerpriorityControllerVARIABLE_NAME_MISMATCH
    org.columba.mail.gui.composer.SubjectControllerorg.columba.mail.gui.composer.PriorityControllerVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.columba.mail.gui.composer.SubjectController of variable subjectController does not match with type org.columba.mail.gui.composer.PriorityController of variable priorityController
    • Make classes org.columba.mail.gui.composer.SubjectController and org.columba.mail.gui.composer.PriorityController extend a common superclass
    10
    return priorityController.getView();
    11
    else if (aComponent.equals(subjectController.getView()))
    11
    else if (aComponent.equals(subjectController.getView()))
    11
    else if (aComponent.equals(priorityController.getView()))
    Differences
    Expression1Expression2Difference
    subjectControllerpriorityControllerVARIABLE_NAME_MISMATCH
    org.columba.mail.gui.composer.SubjectControllerorg.columba.mail.gui.composer.PriorityControllerVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.columba.mail.gui.composer.SubjectController of variable subjectController does not match with type org.columba.mail.gui.composer.PriorityController of variable priorityController
    • Make classes org.columba.mail.gui.composer.SubjectController and org.columba.mail.gui.composer.PriorityController extend a common superclass
    11
    else if (aComponent.equals(priorityController.getView()))
                                                                                  
    12
    return accountController.getView();
    Preondition Violations
    Unmatched return accountController.getView();
    12
    return accountController.getView();
    12
    return currentEditorController.getComponent();
    12
    return currentEditorController.getComponent();
    Preondition Violations
    Unmatched return currentEditorController.getComponent();
                                                                                                        
    Precondition Violations (4)
    Row Violation
    1Type org.columba.mail.gui.composer.SubjectController of variable subjectController does not match with type org.columba.mail.gui.composer.PriorityController of variable priorityController
    2Type org.columba.mail.gui.composer.SubjectController of variable subjectController does not match with type org.columba.mail.gui.composer.PriorityController of variable priorityController
    3Unmatched return accountController.getView();
    4Unmatched return currentEditorController.getComponent();