if (e.getClickCount() >= 2) { showDetailedLogRecord(); }
if (view.count() > 0) { removeSelected(); }
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/plugins/org.columba.core.LogDisplay/src/org/columba/core/gui/logdisplay/LogPanel.java File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/gui/composer/AttachmentController.java
Method name: void mouseClicked(MouseEvent) Method name: void cut()
Number of AST nodes: 2 Number of AST nodes: 2
1
if (e.getClickCount() >= 2) {
1
if (view.count() > 0) {
2
                    showDetailedLogRecord();
3
                
2
			removeSelected();
4
}
3
		}
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.3
Clones locationClones are in different classes
Number of node comparisons4
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements2
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)12.6
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    if (e.getClickCount() >= 2)
    1
    if (e.getClickCount() >= 2)
    1
    if (view.count() > 0)
    Differences
    Expression1Expression2Difference
    getClickCountcountMETHOD_INVOCATION_NAME_MISMATCH
    eviewVARIABLE_NAME_MISMATCH
    java.awt.event.MouseEventorg.columba.mail.gui.composer.AttachmentViewVARIABLE_TYPE_MISMATCH
    20LITERAL_VALUE_MISMATCH
    >=>OPERATOR_MISMATCH
    Preondition Violations
    Type java.awt.event.MouseEvent of variable e does not match with type org.columba.mail.gui.composer.AttachmentView of variable view
    • Make classes java.awt.event.MouseEvent and org.columba.mail.gui.composer.AttachmentView extend a common superclass
    1
    if (view.count() > 0)
    2
    showDetailedLogRecord();
    2
    showDetailedLogRecord();
    2
    removeSelected();
    Differences
    Expression1Expression2Difference
    showDetailedLogRecordremoveSelectedMETHOD_INVOCATION_NAME_MISMATCH
    Preondition Violations
    Expression removeSelected() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression showDetailedLogRecord() is a void method call, and thus it cannot be parameterized
    Expression removeSelected() is a void method call, and thus it cannot be parameterized
    2
    removeSelected();
    Precondition Violations (5)
    Row Violation
    1Type java.awt.event.MouseEvent of variable e does not match with type org.columba.mail.gui.composer.AttachmentView of variable view
    2Expression removeSelected() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Expression showDetailedLogRecord() is a void method call, and thus it cannot be parameterized
    4Expression removeSelected() is a void method call, and thus it cannot be parameterized
    5The refactoring of the clones is infeasible, because classes and org.columba.mail.gui.composer.AttachmentController do not have a common superclass