JPanel panel = new JPanel(new BorderLayout(5, 0)); JLabel label = new JLabel(JMeterUtils.getResString("starttime")); //$NON-NLS-1$ panel.add(label, BorderLayout.WEST); start = new JDateField(); panel.add(start, BorderLayout.CENTER); return panel;
JPanel panel = new JPanel(new BorderLayout(5, 0)); 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;
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 createStartTimePanel() Method name: JPanel createDurationPanel()
Number of AST nodes: 6 Number of AST nodes: 6
1
JPanel panel = new JPanel(new BorderLayout(5, 0));
1
JPanel panel = new JPanel(new BorderLayout(5, 0));
2
		JLabel label = new JLabel(JMeterUtils.getResString("starttime")); //$NON-NLS-1$
2
		JLabel label = new JLabel(JMeterUtils.getResString("duration")); // $NON-NLS-1$
3
		panel.add(label, BorderLayout.WEST);
3
		panel.add(label, BorderLayout.WEST);
4
		start = new JDateField();
4
		duration = new JTextField();
5
		panel.add(start, BorderLayout.CENTER);
5
		panel.add(duration, BorderLayout.CENTER);
6
		return panel;
6
		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 comparisons19
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements6
    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
    1
    JPanel panel = new JPanel(new BorderLayout(5, 0));
    1
    JPanel panel = new JPanel(new BorderLayout(5, 0));
    2
    JLabel label = new JLabel(JMeterUtils.getResString("starttime"));
    2
    JLabel label = new JLabel(JMeterUtils.getResString("starttime"));
    2
    JLabel label = new JLabel(JMeterUtils.getResString("duration"));
    Differences
    Expression1Expression2Difference
    "starttime""duration"LITERAL_VALUE_MISMATCH
    2
    JLabel label = new JLabel(JMeterUtils.getResString("duration"));
    3
    panel.add(label, BorderLayout.WEST);
    3
    panel.add(label, BorderLayout.WEST);
    4
    start = new JDateField();
    4
    start = new JDateField();
    4
    duration = new JTextField();
    Differences
    Expression1Expression2Difference
    startdurationVARIABLE_NAME_MISMATCH
    org.apache.jmeter.gui.util.JDateFieldjavax.swing.JTextFieldSUBCLASS_TYPE_MISMATCH
    org.apache.jmeter.gui.util.JDateFieldjavax.swing.JTextFieldSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression start is a field being modified, and thus it cannot be parameterized
    Expression duration is a field being modified, and thus it cannot be parameterized
    4
    duration = new JTextField();
    5
    panel.add(start, BorderLayout.CENTER);
    5
    panel.add(start, BorderLayout.CENTER);
    5
    panel.add(duration, BorderLayout.CENTER);
    Differences
    Expression1Expression2Difference
    startdurationVARIABLE_NAME_MISMATCH
    org.apache.jmeter.gui.util.JDateFieldjavax.swing.JTextFieldSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression start cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression duration cannot be parameterized, because it has dependencies to/from statements that will be extracted
    5
    panel.add(duration, BorderLayout.CENTER);
    6
    return panel;
    6
    return panel;
    Precondition Violations (4)
    Row Violation
    1Expression start is a field being modified, and thus it cannot be parameterized
    2Expression duration is a field being modified, and thus it cannot be parameterized
    3Expression start cannot be parameterized, because it has dependencies to/from statements that will be extracted
    4Expression duration cannot be parameterized, because it has dependencies to/from statements that will be extracted