if (!result) { tp.setSelectedComponent(identityPanel); return false; } result = incomingServerPanel.isFinished(); if (!result) { tp.setSelectedComponent(incomingServerPanel); return false; }
result = incomingServerPanel.isFinished(); if (!result) { tp.setSelectedComponent(incomingServerPanel); return false; } result = outgoingServerPanel.isFinished(); if (!result) { tp.setSelectedComponent(outgoingServerPanel); return false; }
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/gui/config/account/AccountDialog.java File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/gui/config/account/AccountDialog.java
Method name: boolean isFinished() Method name: boolean isFinished()
Number of AST nodes: 7 Number of AST nodes: 8
1
result = incomingServerPanel.isFinished();
1
if (!result) {
2
		if (!result) {
2
			tp.setSelectedComponent(identityPanel);
3
			tp.setSelectedComponent(incomingServerPanel);
3
			return false;
4
			return false;
4
		}
5
		}
5
		result = incomingServerPanel.isFinished();
6
		result = outgoingServerPanel.isFinished();
6
		if (!result) {
7
		if (!result) {
7
			tp.setSelectedComponent(incomingServerPanel);
8
			tp.setSelectedComponent(outgoingServerPanel);
8
			return false;
9
			return false;
9
		}
10
		}
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 the same method
Number of node comparisons30
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements7
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment1
    Time elapsed for statement mapping (ms)0.9
    Clone typeType 3
    Mapped Statements
    ID Statement ID Statement
    2
    if (!result)
    6
    if (!result)
    3
    tp.setSelectedComponent(identityPanel);
    3
    tp.setSelectedComponent(identityPanel);
    7
    tp.setSelectedComponent(incomingServerPanel);
    Differences
    Expression1Expression2Difference
    identityPanelincomingServerPanelVARIABLE_NAME_MISMATCH
    org.columba.mail.gui.config.account.IdentityPanelorg.columba.mail.gui.config.account.IncomingServerPanelSUBCLASS_TYPE_MISMATCH
    7
    tp.setSelectedComponent(incomingServerPanel);
    4
    return false;
    4
    return false;
    8
    return false;
    Preondition Violations
    Conditional return false;
    Conditional return false;
    8
    return false;
    5
    result = incomingServerPanel.isFinished();
    5
    result = incomingServerPanel.isFinished();
                                                                                          
    9
    result = outgoingServerPanel.isFinished();
    Preondition Violations
    Unmatched statement result=outgoingServerPanel.isFinished(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    9
    result = outgoingServerPanel.isFinished();
    6
    if (!result)
    10
    if (!result)
    7
    tp.setSelectedComponent(incomingServerPanel);
    7
    tp.setSelectedComponent(incomingServerPanel);
    11
    tp.setSelectedComponent(outgoingServerPanel);
    Differences
    Expression1Expression2Difference
    incomingServerPaneloutgoingServerPanelVARIABLE_NAME_MISMATCH
    org.columba.mail.gui.config.account.IncomingServerPanelorg.columba.mail.gui.config.account.OutgoingServerPanelSUBCLASS_TYPE_MISMATCH
    11
    tp.setSelectedComponent(outgoingServerPanel);
    8
    return false;
    8
    return false;
    12
    return false;
    Preondition Violations
    Conditional return false;
    Conditional return false;
    12
    return false;
    Precondition Violations (5)
    Row Violation
    1Unmatched statement result=outgoingServerPanel.isFinished(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    2Conditional return false;
    3Conditional return false;
    4Conditional return false;
    5Conditional return false;