MenuElement menuElement = new MenuElement(IMenuElement.TYPE_MENU); menuElement.setMenuId(menuId); menuElement.setMenuLabel(menuLabel); return menuElement;
MenuElement menuElement = new MenuElement(IMenuElement.TYPE_PLACEHOLDER); menuElement.setPlaceholderId(placeholderId); return menuElement;
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/core/src/main/java/org/columba/core/gui/menu/MenuElementFactory.java File path: /columba-1.4-src/core/src/main/java/org/columba/core/gui/menu/MenuElementFactory.java
Method name: IMenuElement createMenuElement(String, String) Method name: IMenuElement createPlaceholderElement(String)
Number of AST nodes: 4 Number of AST nodes: 3
1
MenuElement menuElement = new MenuElement(IMenuElement.TYPE_MENU);
1
MenuElement menuElement = new MenuElement(IMenuElement.TYPE_PLACEHOLDER);
2
		menuElement.setMenuId(menuId);
2
		menuElement.set
3
		menuElement.setMenuLabel(menuLabel);
3
PlaceholderId(placeholderId);
4
		return menuElement;
4
		return menuElement;
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 declared in the same class
Number of node comparisons8
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements3
    Number of unmapped statements in the first code fragment1
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 3
    Mapped Statements
    ID Statement ID Statement
    1
    MenuElement menuElement = new MenuElement(IMenuElement.TYPE_MENU);
    1
    MenuElement menuElement = new MenuElement(IMenuElement.TYPE_MENU);
    1
    MenuElement menuElement = new MenuElement(IMenuElement.TYPE_PLACEHOLDER);
    Differences
    Expression1Expression2Difference
    TYPE_MENUTYPE_PLACEHOLDERVARIABLE_NAME_MISMATCH
    1
    MenuElement menuElement = new MenuElement(IMenuElement.TYPE_PLACEHOLDER);
    2
    menuElement.setMenuId(menuId);
    2
    menuElement.setMenuId(menuId);
    2
    menuElement.setPlaceholderId(placeholderId);
    Differences
    Expression1Expression2Difference
    setMenuIdsetPlaceholderIdMETHOD_INVOCATION_NAME_MISMATCH
    menuIdplaceholderIdVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression menuElement.setMenuId(menuId) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression menuElement.setPlaceholderId(placeholderId) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression menuElement.setMenuId(menuId) is a void method call, and thus it cannot be parameterized
    Expression menuElement.setPlaceholderId(placeholderId) is a void method call, and thus it cannot be parameterized
    2
    menuElement.setPlaceholderId(placeholderId);
    3
    menuElement.setMenuLabel(menuLabel);
                                                                                  
    4
    return menuElement;
    3
    return menuElement;
    Precondition Violations (5)
    Row Violation
    1Expression menuElement.setMenuId(menuId) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression menuElement.setPlaceholderId(placeholderId) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Expression menuElement.setMenuId(menuId) is a void method call, and thus it cannot be parameterized
    4Expression menuElement.setPlaceholderId(placeholderId) is a void method call, and thus it cannot be parameterized
    5Clone fragment #1 returns variables menuElement , while Clone fragment #2 returns variables