public void doAction(ActionEvent e) { if (helpWindow == null) { helpWindow = new JDialog(new Frame(),// independent frame to // allow it to be overlaid // by the main frame JMeterUtils.getResString("help"),//$NON-NLS-1$ false); helpWindow.getContentPane().setLayout(new GridLayout(1, 1)); ComponentUtil.centerComponentInWindow(helpWindow, 60); } helpWindow.getContentPane().removeAll(); helpWindow.getContentPane().add(scroller); helpWindow.show(); if (e.getSource() instanceof String[]) { String[] source = (String[]) e.getSource(); resetPage(source[0]); helpDoc.scrollToReference(source[1]); } else { resetPage(HELP_PAGE); helpDoc.scrollToReference(GuiPackage.getInstance().getTreeListener().getCurrentNode().getDocAnchor());
public void doAction(ActionEvent e) { if (helpWindow == null) { helpWindow = new JDialog(new Frame(),// independent frame to // allow it to be overlaid // by the main frame JMeterUtils.getResString("help"),//$NON-NLS-1$ false); helpWindow.getContentPane().setLayout(new GridLayout(1, 1)); ComponentUtil.centerComponentInWindow(helpWindow, 60); } helpWindow.getContentPane().removeAll(); helpWindow.getContentPane().add(scroller); helpWindow.show(); if (e.getSource() instanceof String[]) { String[] source = (String[]) e.getSource(); resetPage(source[0]); helpDoc.scrollToReference(source[1]); } else { resetPage(HELP_PAGE); helpDoc.scrollToReference(ReportGuiPackage.getInstance().getTreeListener().getCurrentNode().getDocAnchor());
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/gui/action/Help.java File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/report/gui/action/ReportHelp.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
public void doAction(ActionEvent e) {
1
public void doAction(ActionEvent e) {
2
		if (helpWindow == null) {
2
		if (helpWindow == null) {
3
			helpWindow = new JDialog(new Frame(),// independent frame to
3
			helpWindow = new JDialog(new Frame(),// independent frame to
4
													// allow it to be overlaid
4
													// allow it to be overlaid
5
													// by the main frame
5
													// by the main frame
6
					JMeterUtils.getResString("help"),//$NON-NLS-1$
6
					JMeterUtils.getResString("help"),//$NON-NLS-1$
7
					false);
7
					false);
8
			helpWindow.getContentPane().setLayout(new GridLayout(1, 1));
8
			helpWindow.getContentPane().setLayout(new GridLayout(1, 1));
9
			ComponentUtil.centerComponentInWindow(helpWindow, 60);
9
			ComponentUtil.centerComponentInWindow(helpWindow, 60);
10
		}
10
		}
11
		helpWindow.getContentPane().removeAll();
11
		helpWindow.getContentPane().removeAll();
12
		helpWindow.getContentPane().add(scroller);
12
		helpWindow.getContentPane().add(scroller);
13
		helpWindow.show();
13
		helpWindow.show();
14
		if (e.getSource() instanceof String[]) {
14
		if (e.getSource() instanceof String[]) {
15
			String[] source = (String[]) e.getSource();
15
			String[] source = (String[]) e.getSource();
16
			resetPage(source[0]);
16
			resetPage(source[0]);
17
			helpDoc.scrollToReference(source[1]);
17
			helpDoc.scrollToReference(source[1]);
18
		} else {
18
		} else {
19
			resetPage(HELP_PAGE);
19
			resetPage(HELP_PAGE);
20
			helpDoc.scrollToReference(GuiPackage.getInstance().getTreeListener().getCurrentNode().getDocAnchor());
20
			helpDoc.scrollToReference(ReportGuiPackage.getInstance().getTreeListener().getCurrentNode().getDocAnchor());
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