private static final Set commands = new HashSet(); static { commands.add(ActionNames.ACTION_START); commands.add(ActionNames.ACTION_STOP); commands.add(ActionNames.ACTION_SHUTDOWN); } private StandardJMeterEngine engine; /** * Constructor for the Start object. */ public Start() { } /** * Gets the ActionNames attribute of the Start object. * * @return the ActionNames value */ public Set getActionNames() { return commands; } public void doAction(ActionEvent e) { if (e.getActionCommand().equals(ActionNames.ACTION_START)) { popupShouldSave(e); startEngine(); } else if (e.getActionCommand().equals(ActionNames.ACTION_STOP)) { if (engine != null) { GuiPackage.getInstance().getMainFrame().showStoppingMessage(""); engine.stopTest(); engine = null; } } else if (e.getActionCommand().equals(ActionNames.ACTION_SHUTDOWN)) { if (engine != null) { GuiPackage.getInstance().getMainFrame().showStoppingMessage(""); engine.askThreadsToStop(); engine = null
private static final Set commands = new HashSet(); static { commands.add(ActionNames.ACTION_START); commands.add(ActionNames.ACTION_STOP); commands.add(ActionNames.ACTION_SHUTDOWN); } private StandardJMeterEngine engine; /** * Constructor for the Start object. */ public ReportStart() { } /** * Gets the ActionNames attribute of the Start object. * * @return the ActionNames value */ public Set getActionNames() { return commands; } public void doAction(ActionEvent e) { if (e.getActionCommand().equals(ActionNames.ACTION_START)) { popupShouldSave(e); startEngine(); } else if (e.getActionCommand().equals(ActionNames.ACTION_STOP)) { if (engine != null) { ReportGuiPackage.getInstance().getMainFrame().showStoppingMessage(""); engine.stopTest(); engine = null; } } else if (e.getActionCommand().equals(ActionNames.ACTION_SHUTDOWN)) { if (engine != null) { ReportGuiPackage.getInstance().getMainFrame().showStoppingMessage(""); engine.askThreadsToStop(); engine = null
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/gui/action/Start.java File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/report/gui/action/ReportStart.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
private static final Set commands = new HashSet();
1
private static final Set commands = new HashSet();
2
	static {
2
	static {
3
		commands.add(ActionNames.ACTION_START);
3
		commands.add(ActionNames.ACTION_START);
4
		commands.add(ActionNames.ACTION_STOP);
4
		commands.add(ActionNames.ACTION_STOP);
5
		commands.add(ActionNames.ACTION_SHUTDOWN);
5
		commands.add(ActionNames.ACTION_SHUTDOWN);
6
	}
6
	}
7
	private StandardJMeterEngine engine;
7
	private StandardJMeterEngine engine;
8
	/**
8
	/**
9
	 * Constructor for the Start object.
9
	 * Constructor for the Start object.
10
	 */
10
	 */
11
	public Start() {
11
	public ReportStart() {
12
	}
12
	}
13
	/**
13
	/**
14
	 * Gets the ActionNames attribute of the Start object.
14
	 * Gets the ActionNames attribute of the Start object.
15
	 * 
15
	 * 
16
	 * @return the ActionNames value
16
	 * @return the ActionNames value
17
	 */
17
	 */
18
	public Set getActionNames() {
18
	public Set getActionNames() {
19
		return commands;
19
		return commands;
20
	}
20
	}
21
	public void doAction(ActionEvent e) {
21
	public void doAction(ActionEvent e) {
22
		if (e.getActionCommand().equals(ActionNames.ACTION_START)) {
22
		if (e.getActionCommand().equals(ActionNames.ACTION_START)) {
23
			popupShouldSave(e);
23
			popupShouldSave(e);
24
			startEngine();
24
			startEngine();
25
		} else if (e.getActionCommand().equals(ActionNames.ACTION_STOP)) {
25
		} else if (e.getActionCommand().equals(ActionNames.ACTION_STOP)) {
26
			if (engine != null) {
26
			if (engine != null) {
27
				GuiPackage.getInstance().getMainFrame().showStoppingMessage("");
27
				ReportGuiPackage.getInstance().getMainFrame().showStoppingMessage("");
28
				engine.stopTest();
28
				engine.stopTest();
29
				engine = null;
29
				engine = null;
30
			}
30
			}
31
		} else if (e.getActionCommand().equals(ActionNames.ACTION_SHUTDOWN)) {
31
		} else if (e.getActionCommand().equals(ActionNames.ACTION_SHUTDOWN)) {
32
			if (engine != null) {
32
			if (engine != null) {
33
				GuiPackage.getInstance().getMainFrame().showStoppingMessage("");
33
				ReportGuiPackage.getInstance().getMainFrame().showStoppingMessage("");
34
				engine.askThreadsToStop();
34
				engine.askThreadsToStop();
35
				engine = null
35
				engine = null
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