run_stop.addActionListener(ActionRouter.getInstance()); run_stop.setActionCommand(ActionNames.ACTION_STOP); run_shut = new JMenuItem(JMeterUtils.getResString("shutdown"), 'Y'); //$NON-NLS-1$ run_shut.setAccelerator(KeyStrokes.ACTION_SHUTDOWN); run_shut.setEnabled(false); run_shut.addActionListener(ActionRouter.getInstance()); run_shut.setActionCommand(ActionNames.ACTION_SHUTDOWN); run_clear = new JMenuItem(JMeterUtils.getResString("clear"), 'C');
run_start.addActionListener(ActionRouter.getInstance()); run_start.setActionCommand(ActionNames.ACTION_START); run_stop = new JMenuItem(JMeterUtils.getResString("stop"), 'T'); //$NON-NLS-1$ run_stop.setAccelerator(KeyStrokes.ACTION_STOP); run_stop.setEnabled(false); run_stop.addActionListener(ActionRouter.getInstance()); run_stop.setActionCommand(ActionNames.ACTION_STOP); run_shut = new JMenuItem(JMeterUtils.getResString("shutdown"), 'Y');
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/JMeterMenuBar.java
Method name: void makeRunMenu() Method name: void makeRunMenu()
Number of AST nodes: 8 Number of AST nodes: 8
1
run_stop.addActionListener(ActionRouter.getInstance());
1
run_start.addActionListener(ActionRouter.getInstance());
2
		run_stop.setActionCommand(ActionNames.ACTION_STOP);
2
		run_start.setActionCommand(ActionNames.ACTION_ST
3
ART);
3
		run_shut = new JMenuItem(JMeterUtils.getResString("shutdown"), 'Y'); //$NON-NLS-1$
4
		run_stop = new JMenuItem(JMeterUtils.getResString("stop"), 'T'); //$NON-NLS-1$
4
		run_shut.setAccelerator(KeyStrokes.ACTION_SHUTDOWN);
5
		run_stop.setAccelerator(KeyStrokes.ACTION_STOP);
5
		run_shut.setEnabled(false);
6
		run_stop.setEnabled(false);
6
		run_shut.addActionListener(ActionRouter.getInstance());
7
		run_stop.addActionListener(ActionRouter.getInstance());
7
		run_shut.setActionCommand(ActionNames.ACTION_SHUTDOWN);
8
		run_stop.setActionCommand(ActionNames.ACTION_STOP);
8
		run_clear = new JMenuItem(JMeterUtils.getResString("clear"), 'C');
9
		run_shut = new JMenuItem(JMeterUtils.getResString("shutdown"), 'Y');
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 the same method
Number of node comparisons39
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements8
    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
    10
    run_stop.addActionListener(ActionRouter.getInstance());
    10
    run_stop.addActionListener(ActionRouter.getInstance());
    5
    run_start.addActionListener(ActionRouter.getInstance());
    Differences
    Expression1Expression2Difference
    run_stoprun_startVARIABLE_NAME_MISMATCH
    5
    run_start.addActionListener(ActionRouter.getInstance());
    11
    run_stop.setActionCommand(ActionNames.ACTION_STOP);
    11
    run_stop.setActionCommand(ActionNames.ACTION_STOP);
    12
    run_shut = new JMenuItem(JMeterUtils.getResString("shutdown"), 'Y');
    12
    run_shut = new JMenuItem(JMeterUtils.getResString("shutdown"), 'Y');
    13
    run_shut.setAccelerator(KeyStrokes.ACTION_SHUTDOWN);
    13
    run_shut.setAccelerator(KeyStrokes.ACTION_SHUTDOWN);
    8
    run_stop.setAccelerator(KeyStrokes.ACTION_STOP);
    Differences
    Expression1Expression2Difference
    ACTION_SHUTDOWNACTION_STOPVARIABLE_NAME_MISMATCH
    run_shutrun_stopVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression run_shut cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression run_stop cannot be parameterized, because it has dependencies to/from statements that will be extracted
    8
    run_stop.setAccelerator(KeyStrokes.ACTION_STOP);
    14
    run_shut.setEnabled(false);
    14
    run_shut.setEnabled(false);
    9
    run_stop.setEnabled(false);
    Differences
    Expression1Expression2Difference
    run_shutrun_stopVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression run_shut cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression run_stop cannot be parameterized, because it has dependencies to/from statements that will be extracted
    9
    run_stop.setEnabled(false);
    15
    run_shut.addActionListener(ActionRouter.getInstance());
    15
    run_shut.addActionListener(ActionRouter.getInstance());
    10
    run_stop.addActionListener(ActionRouter.getInstance());
    Differences
    Expression1Expression2Difference
    run_shutrun_stopVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression run_shut cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression run_stop cannot be parameterized, because it has dependencies to/from statements that will be extracted
    10
    run_stop.addActionListener(ActionRouter.getInstance());
    16
    run_shut.setActionCommand(ActionNames.ACTION_SHUTDOWN);
    16
    run_shut.setActionCommand(ActionNames.ACTION_SHUTDOWN);
    6
    run_start.setActionCommand(ActionNames.ACTION_START);
    Differences
    Expression1Expression2Difference
    ACTION_SHUTDOWNACTION_STARTVARIABLE_NAME_MISMATCH
    run_shutrun_startVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression run_shut cannot be parameterized, because it has dependencies to/from statements that will be extracted
    6
    run_start.setActionCommand(ActionNames.ACTION_START);
    17
    run_clear = new JMenuItem(JMeterUtils.getResString("clear"), 'C');
    17
    run_clear = new JMenuItem(JMeterUtils.getResString("clear"), 'C');
    7
    run_stop = new JMenuItem(JMeterUtils.getResString("stop"), 'T');
    Differences
    Expression1Expression2Difference
    run_clearrun_stopVARIABLE_NAME_MISMATCH
    "clear""stop"LITERAL_VALUE_MISMATCH
    'C''T'LITERAL_VALUE_MISMATCH
    Preondition Violations
    Expression run_clear is a field being modified, and thus it cannot be parameterized
    Expression run_stop is a field being modified, and thus it cannot be parameterized
    7
    run_stop = new JMenuItem(JMeterUtils.getResString("stop"), 'T');
    Precondition Violations (9)
    Row Violation
    1Expression run_shut cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression run_stop cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Expression run_shut cannot be parameterized, because it has dependencies to/from statements that will be extracted
    4Expression run_stop cannot be parameterized, because it has dependencies to/from statements that will be extracted
    5Expression run_shut cannot be parameterized, because it has dependencies to/from statements that will be extracted
    6Expression run_stop cannot be parameterized, because it has dependencies to/from statements that will be extracted
    7Expression run_shut cannot be parameterized, because it has dependencies to/from statements that will be extracted
    8Expression run_clear is a field being modified, and thus it cannot be parameterized
    9Expression run_stop is a field being modified, and thus it cannot be parameterized