JLabel label = new JLabel(JMeterUtils.getResString("duration")); // $NON-NLS-1$ panel.add(label, BorderLayout.WEST); duration = new JTextField(); panel.add(duration, BorderLayout.CENTER); return panel;
JLabel label = new JLabel(JMeterUtils.getResString("delay")); // $NON-NLS-1$ panel.add(label, BorderLayout.WEST); delay = new JTextField(); panel.add(delay, BorderLayout.CENTER); return panel;
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/threads/gui/ThreadGroupGui.java File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/threads/gui/ThreadGroupGui.java
Method name: JPanel createDurationPanel() Method name: JPanel createDelayPanel()
Number of AST nodes: 5 Number of AST nodes: 5
1
JLabel label = new JLabel(JMeterUtils.getResString("duration")); // $NON-NLS-1$
1
JLabel label = new JLabel(JMeterUtils.getResString("delay")); // $NON-NLS-1$
2
		panel.add(label, BorderLayout.WEST);
2
		panel.add(label, BorderLayout.WEST);
3
		duration = new JTextField();
3
		delay = new JTextField();
4
		panel.add(duration, BorderLayout.CENTER);
4
		panel.add(delay, BorderLayout.CENTER);
5
		return panel;
5
		return panel;
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 declared in the same class
Number of node comparisons12
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements5
    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
    2
    JLabel label = new JLabel(JMeterUtils.getResString("duration"));
    2
    JLabel label = new JLabel(JMeterUtils.getResString("duration"));
    2
    JLabel label = new JLabel(JMeterUtils.getResString("delay"));
    Differences
    Expression1Expression2Difference
    "duration""delay"LITERAL_VALUE_MISMATCH
    2
    JLabel label = new JLabel(JMeterUtils.getResString("delay"));
    3
    panel.add(label, BorderLayout.WEST);
    3
    panel.add(label, BorderLayout.WEST);
    4
    duration = new JTextField();
    4
    duration = new JTextField();
    4
    delay = new JTextField();
    Differences
    Expression1Expression2Difference
    durationdelayVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression duration is a field being modified, and thus it cannot be parameterized
    Expression delay is a field being modified, and thus it cannot be parameterized
    4
    delay = new JTextField();
    5
    panel.add(duration, BorderLayout.CENTER);
    5
    panel.add(duration, BorderLayout.CENTER);
    5
    panel.add(delay, BorderLayout.CENTER);
    Differences
    Expression1Expression2Difference
    durationdelayVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression duration cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression delay cannot be parameterized, because it has dependencies to/from statements that will be extracted
    5
    panel.add(delay, BorderLayout.CENTER);
    6
    return panel;
    6
    return panel;
    Precondition Violations (4)
    Row Violation
    1Expression duration is a field being modified, and thus it cannot be parameterized
    2Expression delay is a field being modified, and thus it cannot be parameterized
    3Expression duration cannot be parameterized, because it has dependencies to/from statements that will be extracted
    4Expression delay cannot be parameterized, because it has dependencies to/from statements that will be extracted