public void doAction(ActionEvent ev) { try { String className = ev.getActionCommand().substring(4).replace('/', '.'); UIManager.setLookAndFeel(className); SwingUtilities.updateComponentTreeUI(GuiPackage.getInstance().getMainFrame()); } catch (javax.swing.UnsupportedLookAndFeelException e) { JMeterUtils.reportErrorToUser("Look and Feel unavailable:" + e.toString()); } catch (InstantiationException e) { JMeterUtils.reportErrorToUser("Look and Feel unavailable:" + e.toString()); } catch (ClassNotFoundException e) { JMeterUtils.reportErrorToUser("Look and Feel unavailable:" + e.toString()); } catch (IllegalAccessException e) { JMeterUtils.reportErrorToUser("Look and Feel unavailable:" + e.toString()); } } public Set getActionNames() { return commands;
public void doAction(ActionEvent ev) { try { String className = ev.getActionCommand().substring(4).replace('/', '.'); UIManager.setLookAndFeel(className); SwingUtilities.updateComponentTreeUI(ReportGuiPackage.getInstance().getMainFrame()); } catch (javax.swing.UnsupportedLookAndFeelException e) { JMeterUtils.reportErrorToUser("Look and Feel unavailable:" + e.toString()); } catch (InstantiationException e) { JMeterUtils.reportErrorToUser("Look and Feel unavailable:" + e.toString()); } catch (ClassNotFoundException e) { JMeterUtils.reportErrorToUser("Look and Feel unavailable:" + e.toString()); } catch (IllegalAccessException e) { JMeterUtils.reportErrorToUser("Look and Feel unavailable:" + e.toString()); } } public Set getActionNames() { return commands;
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/gui/action/LookAndFeelCommand.java File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/report/gui/action/ReportLookAndFeelCommand.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
public void doAction(ActionEvent ev) {
1
public void doAction(ActionEvent ev) {
2
		try {
2
		try {
3
			String className = ev.getActionCommand().substring(4).replace('/', '.');
3
			String className = ev.getActionCommand().substring(4).replace('/', '.');
4
			UIManager.setLookAndFeel(className);
4
			UIManager.setLookAndFeel(className);
5
			SwingUtilities.updateComponentTreeUI(GuiPackage.getInstance().getMainFrame());
5
			SwingUtilities.updateComponentTreeUI(ReportGuiPackage.getInstance().getMainFrame());
6
		} catch (javax.swing.UnsupportedLookAndFeelException e) {
6
		} catch (javax.swing.UnsupportedLookAndFeelException e) {
7
			JMeterUtils.reportErrorToUser("Look and Feel unavailable:" + e.toString());
7
			JMeterUtils.reportErrorToUser("Look and Feel unavailable:" + e.toString());
8
		} catch (InstantiationException e) {
8
		} catch (InstantiationException e) {
9
			JMeterUtils.reportErrorToUser("Look and Feel unavailable:" + e.toString());
9
			JMeterUtils.reportErrorToUser("Look and Feel unavailable:" + e.toString());
10
		} catch (ClassNotFoundException e) {
10
		} catch (ClassNotFoundException e) {
11
			JMeterUtils.reportErrorToUser("Look and Feel unavailable:" + e.toString());
11
			JMeterUtils.reportErrorToUser("Look and Feel unavailable:" + e.toString());
12
		} catch (IllegalAccessException e) {
12
		} catch (IllegalAccessException e) {
13
			JMeterUtils.reportErrorToUser("Look and Feel unavailable:" + e.toString());
13
			JMeterUtils.reportErrorToUser("Look and Feel unavailable:" + e.toString());
14
		}
14
		}
15
	}
15
	}
16
	public Set getActionNames() {
16
	public Set getActionNames() {
17
		return commands;
17
		return commands;
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