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()); }
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()); }
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/report/gui/action/ReportLookAndFeelCommand.java File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/gui/action/LookAndFeelCommand.java
Method name: void doAction(ActionEvent) Method name: void doAction(ActionEvent)
Number of AST nodes: 4 Number of AST nodes: 4
1
try {
1
try {
2
			String className = ev.getActionCommand().substring(4).replace('/', '.');
2
			String className = ev.getActionCommand().substring(4).replace('/', '.');
3
			UIManager.setLookAndFeel(className);
3
			UIManager.setLookAndFeel(className);
4
			SwingUtilities.updateComponentTreeUI(ReportGuiPackage.getInstance().getMainFrame());
4
			SwingUtilities.updateComponentTreeUI(GuiPackage.getInstance().getMainFrame());
5
		} catch (javax.swing.UnsupportedLookAndFeelException e) {
5
		} catch (javax.swing.UnsupportedLookAndFeelException e) {
6
			JMeterUtils.reportErrorToUser("Look and Feel unavailable:" + e.toString());
6
			JMeterUtils.reportErrorToUser("Look and Feel unavailable:" + e.toString());
7
		} catch (InstantiationException e) {
7
		} catch (InstantiationException e) {
8
			JMeterUtils.reportErrorToUser("Look and Feel unavailable:" + e.toString());
8
			JMeterUtils.reportErrorToUser("Look and Feel unavailable:" + e.toString());
9
		} catch (ClassNotFoundException e) {
9
		} catch (ClassNotFoundException e) {
10
			JMeterUtils.reportErrorToUser("Look and Feel unavailable:" + e.toString());
10
			JMeterUtils.reportErrorToUser("Look and Feel unavailable:" + e.toString());
11
		} catch (IllegalAccessException e) {
11
		} catch (IllegalAccessException e) {
12
			JMeterUtils.reportErrorToUser("Look and Feel unavailable:" + e.toString());
12
			JMeterUtils.reportErrorToUser("Look and Feel unavailable:" + e.toString());
13
		}
13
		}
Summary
Number of common nesting structure subtrees1
Number of refactorable cases0
Number of non-refactorable cases1
Time elapsed for finding largest common nesting structure subtrees (ms)0.8
Clones locationClones are in different classes
Number of node comparisons16
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements4
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)3.1
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    try
    1
    try
    2
    String className = ev.getActionCommand().substring(4).replace('/', '.');
    2
    String className = ev.getActionCommand().substring(4).replace('/', '.');
    3
    UIManager.setLookAndFeel(className);
    3
    UIManager.setLookAndFeel(className);
    4
    SwingUtilities.updateComponentTreeUI(ReportGuiPackage.getInstance().getMainFrame());
    4
    SwingUtilities.updateComponentTreeUI(ReportGuiPackage.getInstance().getMainFrame());
    4
    SwingUtilities.updateComponentTreeUI(GuiPackage.getInstance().getMainFrame());
    Differences
    Expression1Expression2Difference
    org.apache.jmeter.gui.ReportGuiPackageorg.apache.jmeter.gui.GuiPackageSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression ReportGuiPackage cannot be unified with expression GuiPackage , because common superclass org.apache.jmeter.util.LocaleChangeListener does not declare member(s) public static org.apache.jmeter.gui.ReportGuiPackage getInstance() , public static org.apache.jmeter.gui.GuiPackage getInstance() , public org.apache.jmeter.gui.ReportMainFrame getMainFrame() , public org.apache.jmeter.gui.MainFrame getMainFrame()
    4
    SwingUtilities.updateComponentTreeUI(GuiPackage.getInstance().getMainFrame());
    Precondition Violations (1)
    Row Violation
    1Expression ReportGuiPackage cannot be unified with expression GuiPackage , because common superclass org.apache.jmeter.util.LocaleChangeListener does not declare member(s) public static org.apache.jmeter.gui.ReportGuiPackage getInstance() , public static org.apache.jmeter.gui.GuiPackage getInstance() , public org.apache.jmeter.gui.ReportMainFrame getMainFrame() , public org.apache.jmeter.gui.MainFrame getMainFrame()