file_exit.addActionListener(ActionRouter.getInstance()); file_merge = new JMenuItem(JMeterUtils.getResString("menu_merge"), 'M'); //$NON-NLS-1$ // file_merge.setAccelerator( // KeyStroke.getKeyStroke(KeyEvent.VK_O, KeyEvent.CTRL_MASK)); file_merge.addActionListener(ActionRouter.getInstance()); // Set default SAVE menu item to disabled since the default node that // is selected is ROOT, which does not allow items to be inserted. file_merge.setEnabled(false);
file_exit.addActionListener(ReportActionRouter.getInstance()); file_merge = new JMenuItem(JMeterUtils.getResString("menu_merge"), 'M'); // file_merge.setAccelerator( // KeyStroke.getKeyStroke(KeyEvent.VK_O, KeyEvent.CTRL_MASK)); file_merge.addActionListener(ReportActionRouter.getInstance()); // Set default SAVE menu item to disabled since the default node that // is selected is ROOT, which does not allow items to be inserted. file_merge.setEnabled(false);
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/gui/util/JMeterMenuBar.java File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/gui/util/ReportMenuBar.java
Method name: void makeFileMenu() Method name: void makeFileMenu()
Number of AST nodes: 4 Number of AST nodes: 4
1
file_exit.addActionListener(ActionRouter.getInstance());
1
file_exit.addActionListener(ReportActionRouter.getInstance());
2
		file_merge = new JMenuItem(JMeterUtils.getResString("menu_merge"), 'M'); //$NON-NLS-1$
2
		file_merge = new JMenuItem(JMeterUtils.getResString("menu_merge"), 'M');
3
		// file_merge.setAccelerator(
3
		// file_merge.setAccelerator(
4
		// KeyStroke.getKeyStroke(KeyEvent.VK_O, KeyEvent.CTRL_MASK));
4
		// KeyStroke.getKeyStroke(KeyEvent.VK_O, KeyEvent.CTRL_MASK));
5
		file_merge.addActionListener(ActionRouter.getInstance());
5
		file_merge.addActionListener(ReportActionRouter.getInstance());
6
		// Set default SAVE menu item to disabled since the default node that
6
		// Set default SAVE menu item to disabled since the default node that
7
		// is selected is ROOT, which does not allow items to be inserted.
7
		// is selected is ROOT, which does not allow items to be inserted.
8
		file_merge.setEnabled(false);
8
		file_merge.setEnabled(false);
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.0
Clones locationClones are in different classes having the same super class
Number of node comparisons10
  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)0.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    33
    file_exit.addActionListener(ActionRouter.getInstance());
    33
    file_exit.addActionListener(ActionRouter.getInstance());
    25
    file_exit.addActionListener(ReportActionRouter.getInstance());
    Differences
    Expression1Expression2Difference
    org.apache.jmeter.gui.action.ActionRouterorg.apache.jmeter.report.gui.action.ReportActionRouterVARIABLE_TYPE_MISMATCH
    org.apache.jmeter.gui.action.ActionRouterorg.apache.jmeter.report.gui.action.ReportActionRouterVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.apache.jmeter.gui.action.ActionRouter of variable ActionRouter.getInstance() does not match with type org.apache.jmeter.report.gui.action.ReportActionRouter of variable ReportActionRouter.getInstance()
    • Make classes org.apache.jmeter.gui.action.ActionRouter and org.apache.jmeter.report.gui.action.ReportActionRouter extend a common superclass
    Type org.apache.jmeter.gui.action.ActionRouter of variable ActionRouter does not match with type org.apache.jmeter.report.gui.action.ReportActionRouter of variable ReportActionRouter
    • Make classes org.apache.jmeter.gui.action.ActionRouter and org.apache.jmeter.report.gui.action.ReportActionRouter extend a common superclass
    25
    file_exit.addActionListener(ReportActionRouter.getInstance());
    34
    file_merge = new JMenuItem(JMeterUtils.getResString("menu_merge"), 'M');
    26
    file_merge = new JMenuItem(JMeterUtils.getResString("menu_merge"), 'M');
    35
    file_merge.addActionListener(ActionRouter.getInstance());
    35
    file_merge.addActionListener(ActionRouter.getInstance());
    27
    file_merge.addActionListener(ReportActionRouter.getInstance());
    Differences
    Expression1Expression2Difference
    org.apache.jmeter.gui.action.ActionRouterorg.apache.jmeter.report.gui.action.ReportActionRouterVARIABLE_TYPE_MISMATCH
    org.apache.jmeter.gui.action.ActionRouterorg.apache.jmeter.report.gui.action.ReportActionRouterVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Expression ActionRouter.getInstance() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression ReportActionRouter.getInstance() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Type org.apache.jmeter.gui.action.ActionRouter of variable ActionRouter.getInstance() does not match with type org.apache.jmeter.report.gui.action.ReportActionRouter of variable ReportActionRouter.getInstance()
    • Make classes org.apache.jmeter.gui.action.ActionRouter and org.apache.jmeter.report.gui.action.ReportActionRouter extend a common superclass
    Type org.apache.jmeter.gui.action.ActionRouter of variable ActionRouter does not match with type org.apache.jmeter.report.gui.action.ReportActionRouter of variable ReportActionRouter
    • Make classes org.apache.jmeter.gui.action.ActionRouter and org.apache.jmeter.report.gui.action.ReportActionRouter extend a common superclass
    27
    file_merge.addActionListener(ReportActionRouter.getInstance());
    36
    file_merge.setEnabled(false);
    28
    file_merge.setEnabled(false);
    Precondition Violations (6)
    Row Violation
    1Type org.apache.jmeter.gui.action.ActionRouter of variable ActionRouter.getInstance() does not match with type org.apache.jmeter.report.gui.action.ReportActionRouter of variable ReportActionRouter.getInstance()
    2Type org.apache.jmeter.gui.action.ActionRouter of variable ActionRouter does not match with type org.apache.jmeter.report.gui.action.ReportActionRouter of variable ReportActionRouter
    3Expression ActionRouter.getInstance() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    4Expression ReportActionRouter.getInstance() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    5Type org.apache.jmeter.gui.action.ActionRouter of variable ActionRouter.getInstance() does not match with type org.apache.jmeter.report.gui.action.ReportActionRouter of variable ReportActionRouter.getInstance()
    6Type org.apache.jmeter.gui.action.ActionRouter of variable ActionRouter does not match with type org.apache.jmeter.report.gui.action.ReportActionRouter of variable ReportActionRouter