if (aComponent.equals(priorityController.getView())) return headerController.getView().getToComboBox(); else if (aComponent.equals(headerController.getView() .getToComboBox())) return headerController.getView().getCcComboBox(); else 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(subjectController.getView())) return headerController.getView().getBccComboBox(); else if (aComponent.equals(headerController.getView() .getBccComboBox())) return headerController.getView().getCcComboBox(); else 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: 10 Number of AST nodes: 10
1
if (aComponent.equals(priorityController.getView()))
1
if (aComponent.equals(subjectController.getView()))
2
				return headerController.getView().getToComboBox();
2
				return headerController.getView().getBccComboBox();
3
			else if (aComponent.equals(headerController.getView()
3
			else if (aComponent.equals(headerController.getView()
4
					.getToComboBox()))
4
					.getBccComboBox()))
5
				return headerController.getView().getCcComboBox();
5
				return headerController.getView().getCcComboBox();
6
			else if (aComponent.equals(headerController.getView()
6
			else if (aComponent.equals(headerController.getView()
7
					.getCcComboBox()))
7
					.getCcComboBox()))
8
				return headerController.getView().getBccComboBox();
8
				return headerController.getView().getToComboBox();
9
			else if (aComponent.equals(headerController.getView()
9
			else if (aComponent.equals(headerController.getView()
10
					.getBccComboBox()))
10
					.getToComboBox()))
11
				return subjectController.getView();
11
				return priorityController.getView();
12
			else if (aComponent.equals(subjectController.getView()))
12
			else if (aComponent.equals(priorityController.getView()))
13
				return currentEditorController.getComponent();
13
				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)18.3
Clones locationClones are declared in the same class
Number of node comparisons70
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements9
    Number of unmapped statements in the first code fragment1
    Number of unmapped statements in the second code fragment1
    Time elapsed for statement mapping (ms)9.3
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    3
    else if (aComponent.equals(priorityController.getView()))
    3
    else if (aComponent.equals(priorityController.getView()))
    3
    else if (aComponent.equals(subjectController.getView()))
    Differences
    Expression1Expression2Difference
    priorityControllersubjectControllerVARIABLE_NAME_MISMATCH
    org.columba.mail.gui.composer.PriorityControllerorg.columba.mail.gui.composer.SubjectControllerVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.columba.mail.gui.composer.PriorityController of variable priorityController does not match with type org.columba.mail.gui.composer.SubjectController of variable subjectController
    • Make classes org.columba.mail.gui.composer.PriorityController and org.columba.mail.gui.composer.SubjectController extend a common superclass
    3
    else if (aComponent.equals(subjectController.getView()))
    4
    return headerController.getView().getToComboBox();
    4
    return headerController.getView().getToComboBox();
    4
    return headerController.getView().getBccComboBox();
    Differences
    Expression1Expression2Difference
    getToComboBoxgetBccComboBoxMETHOD_INVOCATION_NAME_MISMATCH
    4
    return headerController.getView().getBccComboBox();
    5
    else if (aComponent.equals(headerController.getView().getToComboBox()))
    5
    else if (aComponent.equals(headerController.getView().getToComboBox()))
    5
    else if (aComponent.equals(headerController.getView().getBccComboBox()))
    Differences
    Expression1Expression2Difference
    getToComboBoxgetBccComboBoxMETHOD_INVOCATION_NAME_MISMATCH
    5
    else if (aComponent.equals(headerController.getView().getBccComboBox()))
    6
    return headerController.getView().getCcComboBox();
    6
    return headerController.getView().getCcComboBox();
    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
    Preondition Violations
    Expression headerController.getView().getBccComboBox() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression headerController.getView().getToComboBox() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    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
    Preondition Violations
    Expression headerController.getView().getBccComboBox() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression headerController.getView().getToComboBox() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    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 (10)
    Row Violation
    1Type org.columba.mail.gui.composer.PriorityController of variable priorityController does not match with type org.columba.mail.gui.composer.SubjectController of variable subjectController
    2Expression headerController.getView().getBccComboBox() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Expression headerController.getView().getToComboBox() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    4Expression headerController.getView().getBccComboBox() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    5Expression headerController.getView().getToComboBox() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    6Type org.columba.mail.gui.composer.SubjectController of variable subjectController does not match with type org.columba.mail.gui.composer.PriorityController of variable priorityController
    7Type org.columba.mail.gui.composer.SubjectController of variable subjectController does not match with type org.columba.mail.gui.composer.PriorityController of variable priorityController
    8Unmatched return accountController.getView();
    9Unmatched return currentEditorController.getComponent();
    10Not all possible execution flows end in a return statement