run_start.addActionListener(ReportActionRouter.getInstance()); run_start.setActionCommand(ACTION_START); run_stop = new JMenuItem(JMeterUtils.getResString("stop"), 'T'); run_stop.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_PERIOD, KeyEvent.CTRL_MASK)); run_stop.setEnabled(false); run_stop.addActionListener(ReportActionRouter.getInstance()); run_stop.setActionCommand(ACTION_STOP); run_shut = new JMenuItem(JMeterUtils.getResString("shutdown"), 'Y');
run_stop.addActionListener(ReportActionRouter.getInstance()); run_stop.setActionCommand(ACTION_STOP); run_shut = new JMenuItem(JMeterUtils.getResString("shutdown"), 'Y'); run_shut.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_COMMA, KeyEvent.CTRL_MASK)); run_shut.setEnabled(false); run_shut.addActionListener(ReportActionRouter.getInstance()); run_shut.setActionCommand(ACTION_SHUTDOWN); run_clear = new JMenuItem(JMeterUtils.getResString("clear"), 'C');
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/gui/util/ReportMenuBar.java File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/gui/util/ReportMenuBar.java
Method name: void makeRunMenu() Method name: void makeRunMenu()
Number of AST nodes: 8 Number of AST nodes: 8
1
run_start.addActionListener(ReportActionRouter.getInstance());
1
run_stop.addActionListener(ReportActionRouter.getInstance());
2
		run_start.setActionCommand(ACTION_START);
2
		run_stop.setActionCommand(ACTION_STOP);
3
		run_stop = new JMenuItem(JMeterUtils.getResString("stop"), 'T');
3
		run_shut = new JMenuItem(JMeterUtils.getResString("shutdown"), 'Y');
4
		run_stop.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_PERIOD, KeyEvent.CTRL_MASK));
4
		run_shut.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_COMMA, KeyEvent.CTRL_MASK));
5
		run_stop.setEnabled(false);
5
		run_shut.setEnabled(false);
6
		run_stop.addActionListener(ReportActionRouter.getInstance());
6
		run_shut.addActionListener(ReportActionRouter.getInstance());
7
		run_stop.setActionCommand(ACTION_STOP);
7
		run_shut.setActionCommand(ACTION_SHUTDOWN);
8
		run_shut = new JMenuItem(JMeterUtils.getResString("shutdown"), 'Y');
8
		run_clear = new JMenuItem(JMeterUtils.getResString("clear"), 'C');
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
    5
    run_start.addActionListener(ReportActionRouter.getInstance());
    5
    run_start.addActionListener(ReportActionRouter.getInstance());
    10
    run_stop.addActionListener(ReportActionRouter.getInstance());
    Differences
    Expression1Expression2Difference
    run_startrun_stopVARIABLE_NAME_MISMATCH
    10
    run_stop.addActionListener(ReportActionRouter.getInstance());
    6
    run_start.setActionCommand(ACTION_START);
    6
    run_start.setActionCommand(ACTION_START);
    11
    run_stop.setActionCommand(ACTION_STOP);
    Differences
    Expression1Expression2Difference
    ACTION_STARTACTION_STOPVARIABLE_NAME_MISMATCH
    run_startrun_stopVARIABLE_NAME_MISMATCH
    11
    run_stop.setActionCommand(ACTION_STOP);
    7
    run_stop = new JMenuItem(JMeterUtils.getResString("stop"), 'T');
    7
    run_stop = new JMenuItem(JMeterUtils.getResString("stop"), 'T');
    12
    run_shut = new JMenuItem(JMeterUtils.getResString("shutdown"), 'Y');
    Differences
    Expression1Expression2Difference
    run_stoprun_shutVARIABLE_NAME_MISMATCH
    "stop""shutdown"LITERAL_VALUE_MISMATCH
    'T''Y'LITERAL_VALUE_MISMATCH
    Preondition Violations
    Expression run_stop is a field being modified, and thus it cannot be parameterized
    Expression run_shut is a field being modified, and thus it cannot be parameterized
    12
    run_shut = new JMenuItem(JMeterUtils.getResString("shutdown"), 'Y');
    8
    run_stop.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_PERIOD, KeyEvent.CTRL_MASK));
    8
    run_stop.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_PERIOD, KeyEvent.CTRL_MASK));
    13
    run_shut.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_COMMA, KeyEvent.CTRL_MASK));
    Differences
    Expression1Expression2Difference
    VK_PERIODVK_COMMAVARIABLE_NAME_MISMATCH
    run_stoprun_shutVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression run_stop cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression run_shut cannot be parameterized, because it has dependencies to/from statements that will be extracted
    13
    run_shut.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_COMMA, KeyEvent.CTRL_MASK));
    9
    run_stop.setEnabled(false);
    9
    run_stop.setEnabled(false);
    14
    run_shut.setEnabled(false);
    Differences
    Expression1Expression2Difference
    run_stoprun_shutVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression run_stop cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression run_shut cannot be parameterized, because it has dependencies to/from statements that will be extracted
    14
    run_shut.setEnabled(false);
    10
    run_stop.addActionListener(ReportActionRouter.getInstance());
    10
    run_stop.addActionListener(ReportActionRouter.getInstance());
    15
    run_shut.addActionListener(ReportActionRouter.getInstance());
    Differences
    Expression1Expression2Difference
    run_stoprun_shutVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression run_stop cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression run_shut cannot be parameterized, because it has dependencies to/from statements that will be extracted
    15
    run_shut.addActionListener(ReportActionRouter.getInstance());
    11
    run_stop.setActionCommand(ACTION_STOP);
    11
    run_stop.setActionCommand(ACTION_STOP);
    16
    run_shut.setActionCommand(ACTION_SHUTDOWN);
    Differences
    Expression1Expression2Difference
    ACTION_STOPACTION_SHUTDOWNVARIABLE_NAME_MISMATCH
    run_stoprun_shutVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression run_stop cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression run_shut cannot be parameterized, because it has dependencies to/from statements that will be extracted
    16
    run_shut.setActionCommand(ACTION_SHUTDOWN);
    12
    run_shut = new JMenuItem(JMeterUtils.getResString("shutdown"), 'Y');
    12
    run_shut = new JMenuItem(JMeterUtils.getResString("shutdown"), 'Y');
    17
    run_clear = new JMenuItem(JMeterUtils.getResString("clear"), 'C');
    Differences
    Expression1Expression2Difference
    run_shutrun_clearVARIABLE_NAME_MISMATCH
    "shutdown""clear"LITERAL_VALUE_MISMATCH
    'Y''C'LITERAL_VALUE_MISMATCH
    Preondition Violations
    Expression run_shut is a field being modified, and thus it cannot be parameterized
    Expression run_clear is a field being modified, and thus it cannot be parameterized
    17
    run_clear = new JMenuItem(JMeterUtils.getResString("clear"), 'C');
    Precondition Violations (12)
    Row Violation
    1Expression run_stop is a field being modified, and thus it cannot be parameterized
    2Expression run_shut is a field being modified, and thus it cannot be parameterized
    3Expression run_stop cannot be parameterized, because it has dependencies to/from statements that will be extracted
    4Expression run_shut cannot be parameterized, because it has dependencies to/from statements that will be extracted
    5Expression run_stop cannot be parameterized, because it has dependencies to/from statements that will be extracted
    6Expression run_shut cannot be parameterized, because it has dependencies to/from statements that will be extracted
    7Expression run_stop cannot be parameterized, because it has dependencies to/from statements that will be extracted
    8Expression run_shut cannot be parameterized, because it has dependencies to/from statements that will be extracted
    9Expression run_stop cannot be parameterized, because it has dependencies to/from statements that will be extracted
    10Expression run_shut cannot be parameterized, because it has dependencies to/from statements that will be extracted
    11Expression run_shut is a field being modified, and thus it cannot be parameterized
    12Expression run_clear is a field being modified, and thus it cannot be parameterized