super(); mLabel.setText(pLabel); choiceList = new JComboBox(items); choiceList.setEditable(editable); init();
super(); mTextField = createTextField(size); mLabel = new JLabel(pLabel); mLabel.setLabelFor(mTextField); init();
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jorphan/gui/JLabeledChoice.java File path: /jakarta-jmeter-2.3.2/src/org/apache/jorphan/gui/JLabeledTextField.java
Method name: void JLabeledChoice(String, String[], boolean) Method name: void JLabeledTextField(String, int)
Number of AST nodes: 5 Number of AST nodes: 5
1
super();
1
super();
2
		mLabel.setText(pLabel);
2
		m
3
		choiceList = new JComboBox(items);
4
		choiceList.setEditable(editable
3
TextField = createTextField(size);
4
		mLabel = new JLabel(pLabel);
5
);
5
		mLabel.setLabelFor(mTextField);
6
		init();
6
		init();
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 comparisons18
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements4
    Number of unmapped statements in the first code fragment1
    Number of unmapped statements in the second code fragment1
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    super();
    1
    super();
                                                              
    3
    mLabel = new JLabel(pLabel);
    2
    mLabel.setText(pLabel);
    2
    mLabel.setText(pLabel);
    5
    init();
    Differences
    Expression1Expression2Difference
    setTextinitMETHOD_INVOCATION_NAME_MISMATCH
    mLabel.setText(pLabel)init()ARGUMENT_NUMBER_MISMATCH
    mLabelMISSING_METHOD_INVOCATION_EXPRESSION
    Preondition Violations
    Expression init() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    • Inline private method init
    Expression mLabel.setText(pLabel) is a void method call, and thus it cannot be parameterized
    Expression init() is a void method call, and thus it cannot be parameterized
    Expression init() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    • Inline private method init
    Expression mLabel.setText(pLabel) is a void method call, and thus it cannot be parameterized
    Expression init() is a void method call, and thus it cannot be parameterized
    5
    init();
    3
    choiceList = new JComboBox(items);
    3
    choiceList = new JComboBox(items);
    2
    mTextField = createTextField(size);
    Differences
    Expression1Expression2Difference
    choiceListmTextFieldVARIABLE_NAME_MISMATCH
    javax.swing.JComboBoxjavax.swing.JTextFieldSUBCLASS_TYPE_MISMATCH
    new JComboBox(items)createTextField(size)TYPE_COMPATIBLE_REPLACEMENT
    Preondition Violations
    Expression choiceList is a field being modified, and thus it cannot be parameterized
    Expression mTextField is a field being modified, and thus it cannot be parameterized
    2
    mTextField = createTextField(size);
    4
    choiceList.setEditable(editable);
    4
    choiceList.setEditable(editable);
    Preondition Violations
    Unmatched statement choiceList.setEditable(editable); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
                                                                            
    5
    init();
    5
    init();
    4
    mLabel.setLabelFor(mTextField);
    Differences
    Expression1Expression2Difference
    initsetLabelForMETHOD_INVOCATION_NAME_MISMATCH
    init()mLabel.setLabelFor(mTextField)ARGUMENT_NUMBER_MISMATCH
    mLabelMISSING_METHOD_INVOCATION_EXPRESSION
    Preondition Violations
    Expression init() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    • Inline private method init
    Expression mLabel.setLabelFor(mTextField) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression init() is a void method call, and thus it cannot be parameterized
    Expression mLabel.setLabelFor(mTextField) is a void method call, and thus it cannot be parameterized
    Expression init() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    • Inline private method init
    Expression mLabel.setLabelFor(mTextField) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression init() is a void method call, and thus it cannot be parameterized
    Expression mLabel.setLabelFor(mTextField) is a void method call, and thus it cannot be parameterized
    4
    mLabel.setLabelFor(mTextField);
    Precondition Violations (17)
    Row Violation
    1Expression init() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression mLabel.setText(pLabel) is a void method call, and thus it cannot be parameterized
    3Expression init() is a void method call, and thus it cannot be parameterized
    4Expression init() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    5Expression mLabel.setText(pLabel) is a void method call, and thus it cannot be parameterized
    6Expression init() is a void method call, and thus it cannot be parameterized
    7Expression choiceList is a field being modified, and thus it cannot be parameterized
    8Expression mTextField is a field being modified, and thus it cannot be parameterized
    9Unmatched statement choiceList.setEditable(editable); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    10Expression init() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    11Expression mLabel.setLabelFor(mTextField) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    12Expression init() is a void method call, and thus it cannot be parameterized
    13Expression mLabel.setLabelFor(mTextField) is a void method call, and thus it cannot be parameterized
    14Expression init() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    15Expression mLabel.setLabelFor(mTextField) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    16Expression init() is a void method call, and thus it cannot be parameterized
    17Expression mLabel.setLabelFor(mTextField) is a void method call, and thus it cannot be parameterized