LookAndFeelCommand() { } 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()); } }
ReportLookAndFeelCommand() { } 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()); } }
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
LookAndFeelCommand() {
1
ReportLookAndFeelCommand() {
2
	}
2
	}
3
	public void doAction(ActionEvent ev) {
3
	public void doAction(ActionEvent ev) {
4
		try {
4
		try {
5
			String className = ev.getActionCommand().substring(4).replace('/', '.');
5
			String className = ev.getActionCommand().substring(4).replace('/', '.');
6
			UIManager.setLookAndFeel(className);
6
			UIManager.setLookAndFeel(className);
7
			SwingUtilities.updateComponentTreeUI(GuiPackage.getInstance().getMainFrame());
7
			SwingUtilities.updateComponentTreeUI(ReportGuiPackage.getInstance().getMainFrame());
8
		} catch (javax.swing.UnsupportedLookAndFeelException e) {
8
		} catch (javax.swing.UnsupportedLookAndFeelException e) {
9
			JMeterUtils.reportErrorToUser("Look and Feel unavailable:" + e.toString());
9
			JMeterUtils.reportErrorToUser("Look and Feel unavailable:" + e.toString());
10
		} catch (InstantiationException e) {
10
		} catch (InstantiationException e) {
11
			JMeterUtils.reportErrorToUser("Look and Feel unavailable:" + e.toString());
11
			JMeterUtils.reportErrorToUser("Look and Feel unavailable:" + e.toString());
12
		} catch (ClassNotFoundException e) {
12
		} catch (ClassNotFoundException e) {
13
			JMeterUtils.reportErrorToUser("Look and Feel unavailable:" + e.toString());
13
			JMeterUtils.reportErrorToUser("Look and Feel unavailable:" + e.toString());
14
		} catch (IllegalAccessException e) {
14
		} catch (IllegalAccessException e) {
15
			JMeterUtils.reportErrorToUser("Look and Feel unavailable:" + e.toString());
15
			JMeterUtils.reportErrorToUser("Look and Feel unavailable:" + e.toString());
16
		}
16
		}
17
	}
17
	}
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