setEnabled(true); removeAll(); createSubMenu();
if (command.equals("DETAILS")) { layoutComponents(); pack(); setLocationRelativeTo(null); }
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/contact/src/main/java/org/columba/addressbook/gui/action/TagContactMenu.java File path: /columba-1.4-src/core/src/main/java/org/columba/core/gui/dialog/ErrorDialog.java
Method name: void valueChanged(ListSelectionEvent) Method name: void actionPerformed(ActionEvent)
Number of AST nodes: 3 Number of AST nodes: 4
1
setEnabled(true);
2
			removeAll();
3
			createSubMenu();
1
if (command.equals("DETAILS")) {
2
			layoutComponents();
3
			pack();
4
			setLocationRelativeTo(null);
5
		}
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.0
Clones locationClones are in different classes having the same super class
Number of node comparisons9
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements3
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    5
    setEnabled(true);
    5
    setEnabled(true);
    11
    pack();
    Differences
    Expression1Expression2Difference
    setEnabledpackMETHOD_INVOCATION_NAME_MISMATCH
    setEnabled(true)pack()ARGUMENT_NUMBER_MISMATCH
    Preondition Violations
    Expression pack() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression setEnabled(true) is a void method call, and thus it cannot be parameterized
    Expression pack() is a void method call, and thus it cannot be parameterized
    Expression pack() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression setEnabled(true) is a void method call, and thus it cannot be parameterized
    Expression pack() is a void method call, and thus it cannot be parameterized
    11
    pack();
    6
    removeAll();
    6
    removeAll();
    10
    layoutComponents();
    Differences
    Expression1Expression2Difference
    removeAlllayoutComponentsMETHOD_INVOCATION_NAME_MISMATCH
    Preondition Violations
    Expression removeAll() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression removeAll() is a void method call, and thus it cannot be parameterized
    Expression layoutComponents() is a void method call, and thus it cannot be parameterized
    10
    layoutComponents();
    7
    createSubMenu();
    7
    createSubMenu();
    12
    setLocationRelativeTo(null);
    Differences
    Expression1Expression2Difference
    createSubMenusetLocationRelativeToMETHOD_INVOCATION_NAME_MISMATCH
    createSubMenu()setLocationRelativeTo(null)ARGUMENT_NUMBER_MISMATCH
    Preondition Violations
    Expression createSubMenu() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression createSubMenu() is a void method call, and thus it cannot be parameterized
    Expression setLocationRelativeTo(null) is a void method call, and thus it cannot be parameterized
    Expression createSubMenu() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression createSubMenu() is a void method call, and thus it cannot be parameterized
    Expression setLocationRelativeTo(null) is a void method call, and thus it cannot be parameterized
    12
    setLocationRelativeTo(null);
    Precondition Violations (16)
    Row Violation
    1Expression pack() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression setEnabled(true) is a void method call, and thus it cannot be parameterized
    3Expression pack() is a void method call, and thus it cannot be parameterized
    4Expression pack() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    5Expression setEnabled(true) is a void method call, and thus it cannot be parameterized
    6Expression pack() is a void method call, and thus it cannot be parameterized
    7Expression removeAll() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    8Expression removeAll() is a void method call, and thus it cannot be parameterized
    9Expression layoutComponents() is a void method call, and thus it cannot be parameterized
    10Expression createSubMenu() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    11Expression createSubMenu() is a void method call, and thus it cannot be parameterized
    12Expression setLocationRelativeTo(null) is a void method call, and thus it cannot be parameterized
    13Expression createSubMenu() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    14Expression createSubMenu() is a void method call, and thus it cannot be parameterized
    15Expression setLocationRelativeTo(null) is a void method call, and thus it cannot be parameterized
    16The refactoring of the clones is infeasible, because classes org.columba.addressbook.gui.action.TagContactMenu and org.columba.core.gui.dialog.ErrorDialog do not have a common superclass