JPopupMenu pop = new JPopupMenu(); pop.add(MenuFactory.makeMenus(MENU_ADD_CONTROLLER, JMeterUtils.getResString("add"),// $NON-NLS-1$ ActionNames.ADD)); pop.add(makeMenus(MENU_PARENT_CONTROLLER, JMeterUtils.getResString("insert_parent"),// $NON-NLS-1$ ActionNames.ADD_PARENT)); MenuFactory.addEditMenu(pop, true); MenuFactory.addFileMenu(pop); return pop;
JPopupMenu pop = new JPopupMenu(); pop.add(MenuFactory.makeMenus(MENU_ADD_SAMPLER, JMeterUtils.getResString("add"),// $NON-NLS-1$ ActionNames.ADD)); pop.add(makeMenus(MENU_PARENT_SAMPLER, JMeterUtils.getResString("insert_parent"),// $NON-NLS-1$ ActionNames.ADD_PARENT)); MenuFactory.addEditMenu(pop, true); MenuFactory.addFileMenu(pop); return pop;
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/gui/util/MenuFactory.java File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/gui/util/MenuFactory.java
Method name: JPopupMenu getDefaultControllerMenu() Method name: JPopupMenu getDefaultSamplerMenu()
Number of AST nodes: 6 Number of AST nodes: 6
1
JPopupMenu pop = new JPopupMenu();
1
JPopupMenu pop = new JPopupMenu();
2
		pop.add(MenuFactory.makeMenus(MENU_ADD_CONTROLLER, 
2
		pop.add(MenuFactory.makeMenus(MENU_ADD_SAMPLER, 
3
				JMeterUtils.getResString("add"),// $NON-NLS-1$
3
				JMeterUtils.getResString("add"),// $NON-NLS-1$
4
				ActionNames.ADD));
4
                ActionNames.ADD));
5
		pop.add(makeMenus(MENU_PARENT_CONTROLLER, 
5
		pop.add(makeMenus(MENU_PARENT_SAMPLER, 
6
				JMeterUtils.getResString("insert_parent"),// $NON-NLS-1$
6
				JMeterUtils.getResString("insert_parent"),// $NON-NLS-1$
7
				ActionNames.ADD_PARENT));
7
                ActionNames.ADD_PARENT));
8
		MenuFactory.addEditMenu(pop, true);
8
		MenuFactory.addEditMenu(pop, true);
9
		MenuFactory.addFileMenu(pop);
9
		MenuFactory.addFileMenu(pop);
10
		return pop;
10
		return pop;
Summary
Number of common nesting structure subtrees1
Number of refactorable cases1
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.0
Clones locationClones are declared in the same class
Number of node comparisons26
  1. {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)0.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    JPopupMenu pop = new JPopupMenu();
    1
    JPopupMenu pop = new JPopupMenu();
    2
    pop.add(MenuFactory.makeMenus(MENU_ADD_CONTROLLER, JMeterUtils.getResString("add"), ActionNames.ADD));
    2
    pop.add(MenuFactory.makeMenus(MENU_ADD_CONTROLLER, JMeterUtils.getResString("add"), ActionNames.ADD));
    2
    pop.add(MenuFactory.makeMenus(MENU_ADD_SAMPLER, JMeterUtils.getResString("add"), ActionNames.ADD));
    Differences
    Expression1Expression2Difference
    MENU_ADD_CONTROLLERMENU_ADD_SAMPLERVARIABLE_NAME_MISMATCH
    2
    pop.add(MenuFactory.makeMenus(MENU_ADD_SAMPLER, JMeterUtils.getResString("add"), ActionNames.ADD));
    3
    pop.add(makeMenus(MENU_PARENT_CONTROLLER, JMeterUtils.getResString("insert_parent"), ActionNames.ADD_PARENT));
    3
    pop.add(makeMenus(MENU_PARENT_CONTROLLER, JMeterUtils.getResString("insert_parent"), ActionNames.ADD_PARENT));
    3
    pop.add(makeMenus(MENU_PARENT_SAMPLER, JMeterUtils.getResString("insert_parent"), ActionNames.ADD_PARENT));
    Differences
    Expression1Expression2Difference
    MENU_PARENT_CONTROLLERMENU_PARENT_SAMPLERVARIABLE_NAME_MISMATCH
    3
    pop.add(makeMenus(MENU_PARENT_SAMPLER, JMeterUtils.getResString("insert_parent"), ActionNames.ADD_PARENT));
    4
    MenuFactory.addEditMenu(pop, true);
    4
    MenuFactory.addEditMenu(pop, true);
    5
    MenuFactory.addFileMenu(pop);
    5
    MenuFactory.addFileMenu(pop);
    6
    return pop;
    6
    return pop;
    Precondition Violations (0)
    Row Violation