remove = new JButton(jEdit.getProperty("grab-key.remove")); remove.addActionListener(new ActionHandler()); buttons.add(remove); buttons.add(Box.createHorizontalStrut(12));
pluginMgr = new JButton(jEdit.getProperty("error-list.plugin-manager")); pluginMgr.addActionListener(new ActionHandler()); buttons.add(pluginMgr); buttons.add(Box.createHorizontalStrut(6));
Clone fragments detected by clone detection tool
File path: /jEdit-4.2/src/org/gjt/sp/jedit/gui/GrabKeyDialog.java File path: /jEdit-4.2/src/org/gjt/sp/jedit/gui/ErrorListDialog.java
Method name: void init(KeyBinding, Vector, Buffer) Method name: void ErrorListDialog(Frame, String, String, Vector, boolean)
Number of AST nodes: 4 Number of AST nodes: 4
1
remove = new JButton(jEdit.getProperty("grab-key.remove"));
1
pluginMgr = new JButton(jEdit.getProperty("
2
				remove
2
error-list.plugin-manager"));
3
.addActionListener(new ActionHandler());
3
			pluginMgr.addActionListener(new ActionHandler());
4
				buttons.add(remove);
4
			buttons.add(pluginMgr);
5
				buttons.add(Box.createHorizontalStrut(12));
5
			buttons.add(Box.createHorizontalStrut(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.0
Clones locationClones are in different classes having the same super class
Number of node comparisons10
  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)0.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    27
    remove = new JButton(jEdit.getProperty("grab-key.remove"));
    27
    remove = new JButton(jEdit.getProperty("grab-key.remove"));
    27
    pluginMgr = new JButton(jEdit.getProperty("error-list.plugin-manager"));
    Differences
    Expression1Expression2Difference
    removepluginMgrVARIABLE_NAME_MISMATCH
    "grab-key.remove""error-list.plugin-manager"LITERAL_VALUE_MISMATCH
    Preondition Violations
    Expression remove is a field being modified, and thus it cannot be parameterized
    Expression pluginMgr is a field being modified, and thus it cannot be parameterized
    27
    pluginMgr = new JButton(jEdit.getProperty("error-list.plugin-manager"));
    28
    remove.addActionListener(new ActionHandler());
    28
    remove.addActionListener(new ActionHandler());
    28
    pluginMgr.addActionListener(new ActionHandler());
    Differences
    Expression1Expression2Difference
    org.gjt.sp.jedit.gui.GrabKeyDialog.ActionHandlerorg.gjt.sp.jedit.gui.ErrorListDialog.ActionHandlerVARIABLE_TYPE_MISMATCH
    removepluginMgrVARIABLE_NAME_MISMATCH
    Preondition Violations
    Type org.gjt.sp.jedit.gui.GrabKeyDialog.ActionHandler of variable new ActionHandler() does not match with type org.gjt.sp.jedit.gui.ErrorListDialog.ActionHandler of variable new ActionHandler()
    • Make classes org.gjt.sp.jedit.gui.GrabKeyDialog.ActionHandler and org.gjt.sp.jedit.gui.ErrorListDialog.ActionHandler extend a common superclass
    Expression remove cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression pluginMgr cannot be parameterized, because it has dependencies to/from statements that will be extracted
    28
    pluginMgr.addActionListener(new ActionHandler());
    29
    buttons.add(remove);
    29
    buttons.add(remove);
    29
    buttons.add(pluginMgr);
    Differences
    Expression1Expression2Difference
    removepluginMgrVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression remove cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression pluginMgr cannot be parameterized, because it has dependencies to/from statements that will be extracted
    29
    buttons.add(pluginMgr);
    30
    buttons.add(Box.createHorizontalStrut(12));
    30
    buttons.add(Box.createHorizontalStrut(12));
    30
    buttons.add(Box.createHorizontalStrut(6));
    Differences
    Expression1Expression2Difference
    126LITERAL_VALUE_MISMATCH
    30
    buttons.add(Box.createHorizontalStrut(6));
    Precondition Violations (7)
    Row Violation
    1Expression remove is a field being modified, and thus it cannot be parameterized
    2Expression pluginMgr is a field being modified, and thus it cannot be parameterized
    3Type org.gjt.sp.jedit.gui.GrabKeyDialog.ActionHandler of variable new ActionHandler() does not match with type org.gjt.sp.jedit.gui.ErrorListDialog.ActionHandler of variable new ActionHandler()
    4Expression remove cannot be parameterized, because it has dependencies to/from statements that will be extracted
    5Expression pluginMgr cannot be parameterized, because it has dependencies to/from statements that will be extracted
    6Expression remove cannot be parameterized, because it has dependencies to/from statements that will be extracted
    7Expression pluginMgr cannot be parameterized, because it has dependencies to/from statements that will be extracted