STATUS status = object.getStatus(); if (status == STATUS.ONLINE) setEnabled(true); else if (status == STATUS.OFFLINE) setEnabled(false);
STATUS status = object.getStatus(); if (status == STATUS.ONLINE) setEnabled(false); else if (status == STATUS.OFFLINE) setEnabled(true);
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/plugins/org.columba.chat.altura/src/org/columba/chat/ui/action/AbstractConnectionAwareAction.java File path: /columba-1.4-src/plugins/org.columba.chat.altura/src/org/columba/chat/ui/action/ConnectAction.java
Method name: void connectionChanged(ConnectionChangedEvent) Method name: void connectionChanged(ConnectionChangedEvent)
Number of AST nodes: 5 Number of AST nodes: 5
1
STATUS status = object.getStatus();
1
STATUS status = object.getStatus();
2
		if (status == STATUS.ONLINE)
2
		if (status == STATUS.ONLINE)
3
			setEnabled(true);
3
			setEnabled(false);
4
		else if (status == STATUS.OFFLINE)
4
		else if (status == STATUS.OFFLINE)
5
			setEnabled(false);
5
			setEnabled(true);
Summary
Number of common nesting structure subtrees1
Number of refactorable cases1
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.5
Clones locationClones are in different classes having the same super class
Number of node comparisons14
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements5
    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.6
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    STATUS status = object.getStatus();
    1
    STATUS status = object.getStatus();
    2
    if (status == STATUS.ONLINE)
    2
    if (status == STATUS.ONLINE)
    3
    setEnabled(true);
    3
    setEnabled(true);
    3
    setEnabled(false);
    Differences
    Expression1Expression2Difference
    truefalseLITERAL_VALUE_MISMATCH
    3
    setEnabled(false);
    4
    else if (status == STATUS.OFFLINE)
    4
    else if (status == STATUS.OFFLINE)
    5
    setEnabled(false);
    5
    setEnabled(false);
    5
    setEnabled(true);
    Differences
    Expression1Expression2Difference
    falsetrueLITERAL_VALUE_MISMATCH
    5
    setEnabled(true);
    Precondition Violations (0)
    Row Violation