JMenu makeMenus(String[] categories, String label, String actionCommand) { JMenu addMenu = new JMenu(label); for (int i = 0; i < categories.length; i++) { addMenu.add(makeMenu(categories[i], actionCommand)); } return addMenu; } public static JPopupMenu getDefaultControllerMenu() { 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; }
JMenu makeMenus(String[] categories, String label, String actionCommand) { JMenu addMenu = new JMenu(label); for (int i = 0; i < categories.length; i++) { addMenu.add(makeMenu(categories[i], actionCommand)); } return addMenu; } public static JPopupMenu getDefaultControllerMenu() { 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; }
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/gui/util/ReportMenuFactory.java File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/gui/util/MenuFactory.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
JMenu makeMenus(String[] categories, String label, String actionCommand) {
1
JMenu makeMenus(String[] categories, String label, String actionCommand) {
2
		JMenu addMenu = new JMenu(label);
2
		JMenu addMenu = new JMenu(label);
3
		for (int i = 0; i < categories.length; i++) {
3
		for (int i = 0; i < categories.length; i++) {
4
			addMenu.add(makeMenu(categories[i], actionCommand));
4
			addMenu.add(makeMenu(categories[i], actionCommand));
5
		}
5
		}
6
		return addMenu;
6
		return addMenu;
7
	}
7
	}
8
	public static JPopupMenu getDefaultControllerMenu() {
8
	public static JPopupMenu getDefaultControllerMenu() {
9
		JPopupMenu pop = new JPopupMenu();
9
		JPopupMenu pop = new JPopupMenu();
10
		pop.add(MenuFactory.makeMenus(MENU_ADD_CONTROLLER,
10
		pop.add(MenuFactory.makeMenus(MENU_ADD_CONTROLLER, 
11
				JMeterUtils.getResString("add"),// $NON-NLS-1$
11
				JMeterUtils.getResString("add"),// $NON-NLS-1$
12
				ActionNames.ADD));
12
				ActionNames.ADD));
13
		pop.add(makeMenus(MENU_PARENT_CONTROLLER, 
13
		pop.add(makeMenus(MENU_PARENT_CONTROLLER, 
14
				JMeterUtils.getResString("insert_parent"),// $NON-NLS-1$
14
				JMeterUtils.getResString("insert_parent"),// $NON-NLS-1$
15
				ActionNames.ADD_PARENT));
15
				ActionNames.ADD_PARENT));
16
		MenuFactory.addEditMenu(pop, true);
16
		MenuFactory.addEditMenu(pop, true);
17
		MenuFactory.addFileMenu(pop);
17
		MenuFactory.addFileMenu(pop);
18
		return pop;
18
		return pop;
19
	}
19
	}
Summary
Number of common nesting structure subtrees0
Number of refactorable cases0
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.0
Clones location
Number of node comparisons0