if (this.showToolbarText != showToolbarText) { Boolean oldValue = this.showToolbarText ? Boolean.TRUE : Boolean.FALSE; this.showToolbarText = showToolbarText; firePropertyChange("showToolBarText", oldValue, showToolbarText ? Boolean.TRUE : Boolean.FALSE); }
if (this.state != state) { Boolean oldValue = this.state ? Boolean.TRUE : Boolean.FALSE; this.state = state; firePropertyChange("selected", oldValue, state ? Boolean.TRUE : Boolean.FALSE); }
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/core/src/main/java/org/columba/core/gui/action/AbstractColumbaAction.java File path: /columba-1.4-src/core/src/main/java/org/columba/core/gui/action/AbstractSelectableAction.java
Method name: void setShowToolBarText(boolean) Method name: void setState(boolean)
Number of AST nodes: 4 Number of AST nodes: 4
1
if (this.showToolbarText != showToolbarText) {
1
if (this.state != state) {
2
            Boolean oldValue = this.showToolbarText ? Boolean.TRUE : Boolean.FALSE;
2
            Boolean oldValue = this.state ? Boolean.TRUE : Boolean.FALSE;
3
            this.showToolbarText = showToolbarText;
3
            this.state = state;
4
            firePropertyChange("showToolBarText", oldValue,
4
            firePropertyChange("selected", oldValue,
5
                showToolbarText ? Boolean.TRUE : Boolean.FALSE);
5
                state ? Boolean.TRUE : Boolean.FALSE);
6
        }
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.1
Clones locationClones are in different classes having the same super class
Number of node comparisons16
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements4
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)1.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    if (this.showToolbarText != showToolbarText)
    1
    if (this.showToolbarText != showToolbarText)
    1
    if (this.state != state)
    Differences
    Expression1Expression2Difference
    showToolbarTextstateVARIABLE_NAME_MISMATCH
    showToolbarTextstateVARIABLE_NAME_MISMATCH
    1
    if (this.state != state)
    2
    Boolean oldValue = this.showToolbarText ? Boolean.TRUE : Boolean.FALSE;
    2
    Boolean oldValue = this.showToolbarText ? Boolean.TRUE : Boolean.FALSE;
    2
    Boolean oldValue = this.state ? Boolean.TRUE : Boolean.FALSE;
    Differences
    Expression1Expression2Difference
    showToolbarTextstateVARIABLE_NAME_MISMATCH
    2
    Boolean oldValue = this.state ? Boolean.TRUE : Boolean.FALSE;
    3
    this.showToolbarText = showToolbarText;
    3
    this.showToolbarText = showToolbarText;
    3
    this.state = state;
    Differences
    Expression1Expression2Difference
    showToolbarTextstateVARIABLE_NAME_MISMATCH
    showToolbarTextstateVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression this.showToolbarText is a field being modified, and thus it cannot be parameterized
    Expression this.state is a field being modified, and thus it cannot be parameterized
    3
    this.state = state;
    4
    firePropertyChange("showToolBarText", oldValue, showToolbarText ? Boolean.TRUE : Boolean.FALSE);
    4
    firePropertyChange("showToolBarText", oldValue, showToolbarText ? Boolean.TRUE : Boolean.FALSE);
    4
    firePropertyChange("selected", oldValue, state ? Boolean.TRUE : Boolean.FALSE);
    Differences
    Expression1Expression2Difference
    "showToolBarText""selected"LITERAL_VALUE_MISMATCH
    showToolbarTextstateVARIABLE_NAME_MISMATCH
    4
    firePropertyChange("selected", oldValue, state ? Boolean.TRUE : Boolean.FALSE);
    Precondition Violations (2)
    Row Violation
    1Expression this.showToolbarText is a field being modified, and thus it cannot be parameterized
    2Expression this.state is a field being modified, and thus it cannot be parameterized