String id = menuElement.getAttributeValue(MenuXMLDecoder.ID); AbstractColumbaAction action = getAction(id, mediator); if (action == null) continue; CMenuItem menuItem = new CMenuItem(action); menuItem.addMouseListener(mediator.getMouseTooltipHandler());
String id = menuElement.getAttributeValue(MenuXMLDecoder.ID); AbstractColumbaAction action = getAction(id, mediator); if (action == null) continue; JRadioButtonMenuItem menuItem = new JRadioButtonMenuItem(action); menuItem.addMouseListener(mediator.getMouseTooltipHandler());
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/core/src/main/java/org/columba/core/gui/menu/MenuXMLDecoder.java File path: /columba-1.4-src/core/src/main/java/org/columba/core/gui/menu/MenuXMLDecoder.java
Method name: void parsePopupMenu(ExtendablePopupMenu, Element) Method name: void parsePopupMenu(ExtendablePopupMenu, Element)
Number of AST nodes: 6 Number of AST nodes: 6
1
String id = menuElement.getAttributeValue(MenuXMLDecoder.ID);
1
String id = menuElement.getAttributeValue(MenuXMLDecoder.ID);
2
				AbstractColumbaAction action = getAction(id, mediator);
2
				AbstractColumbaAction action = getAction(id, mediator);
3
				if (action == null)
3
				if (action == null)
4
					continue;
4
					continue;
5
				CMenuItem menuItem = new CMenuItem(action);
5
				JRadioButtonMenuItem menuItem = new JRadioButtonMenuItem(action);
6
				menuItem.addMouseListener(mediator.getMouseTooltipHandler());
6
				menuItem.addMouseListener(mediator.getMouseTooltipHandler());
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.2
Clones locationClones are in the same method
Number of node comparisons14
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements6
    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.2
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    11
    String id = menuElement.getAttributeValue(MenuXMLDecoder.ID);
    27
    String id = menuElement.getAttributeValue(MenuXMLDecoder.ID);
    12
    AbstractColumbaAction action = getAction(id, mediator);
    28
    AbstractColumbaAction action = getAction(id, mediator);
    13
    if (action == null)
    29
    if (action == null)
    14
    continue;
    14
    continue;
    30
    continue;
    Preondition Violations
    Statement continue; without innermost loop
    Statement continue; without innermost loop
    30
    continue;
    15
    CMenuItem menuItem = new CMenuItem(action);
    15
    CMenuItem menuItem = new CMenuItem(action);
    31
    JRadioButtonMenuItem menuItem = new JRadioButtonMenuItem(action);
    Differences
    Expression1Expression2Difference
    org.columba.core.gui.base.CMenuItemjavax.swing.JRadioButtonMenuItemSUBCLASS_TYPE_MISMATCH
    org.columba.core.gui.base.CMenuItemjavax.swing.JRadioButtonMenuItemSUBCLASS_TYPE_MISMATCH
    org.columba.core.gui.base.CMenuItemjavax.swing.JRadioButtonMenuItemSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression new CMenuItem(action) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression new JRadioButtonMenuItem(action) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    31
    JRadioButtonMenuItem menuItem = new JRadioButtonMenuItem(action);
    16
    menuItem.addMouseListener(mediator.getMouseTooltipHandler());
    16
    menuItem.addMouseListener(mediator.getMouseTooltipHandler());
    32
    menuItem.addMouseListener(mediator.getMouseTooltipHandler());
    Differences
    Expression1Expression2Difference
    org.columba.core.gui.base.CMenuItemjavax.swing.JRadioButtonMenuItemSUBCLASS_TYPE_MISMATCH
    32
    menuItem.addMouseListener(mediator.getMouseTooltipHandler());
    Precondition Violations (5)
    Row Violation
    1Statement continue; without innermost loop
    2Statement continue; without innermost loop
    3Expression new CMenuItem(action) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    4Expression new JRadioButtonMenuItem(action) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    5Clone fragment #1 returns variable menuItem with type org.columba.core.gui.base.CMenuItem , while Clone fragment #2 returns variable menuItem with type javax.swing.JRadioButtonMenuItem