super(); textField = new JTextField(); textField.addActionListener(this); textField.addFocusListener(this);
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/jmeter/testbeans/gui/FieldStringEditor.java File path: /jakarta-jmeter-2.3.2/src/org/apache/jorphan/gui/JLabeledTextField.java
Method name: void FieldStringEditor() Method name: void JLabeledTextField(String, int)
Number of AST nodes: 4 Number of AST nodes: 5
1
super();
1
super();
2
		textField = new JTextField();
2
		mTextField = createTextField(size);
3
		textField.addActionListener(this);
3
		
4
		textField.addFocusListener(this
4
mLabel = new JLabel(pLabel);
5
		mLabel.setLabelFor(mTextField);
5
);
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
Number of node comparisons14
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements3
    Number of unmapped statements in the first code fragment1
    Number of unmapped statements in the second code fragment2
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 3
    Mapped Statements
    ID Statement ID Statement
    1
    super();
    1
    super();
    2
    textField = new JTextField();
    2
    textField = new JTextField();
    2
    mTextField = createTextField(size);
    Differences
    Expression1Expression2Difference
    textFieldmTextFieldVARIABLE_NAME_MISMATCH
    new JTextField()createTextField(size)TYPE_COMPATIBLE_REPLACEMENT
    Preondition Violations
    Expression textField 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);
                                                              
    3
    mLabel = new JLabel(pLabel);
                                                                        
    4
    mLabel.setLabelFor(mTextField);
    3
    textField.addActionListener(this);
    3
    textField.addActionListener(this);
    5
    init();
    Differences
    Expression1Expression2Difference
    addActionListenerinitMETHOD_INVOCATION_NAME_MISMATCH
    textField.addActionListener(this)init()ARGUMENT_NUMBER_MISMATCH
    textFieldMISSING_METHOD_INVOCATION_EXPRESSION
    Preondition Violations
    Expression textField.addActionListener(this) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression init() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    • Inline private method init
    Expression textField.addActionListener(this) 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 textField.addActionListener(this) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression init() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    • Inline private method init
    Expression textField.addActionListener(this) 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();
    4
    textField.addFocusListener(this);
                                                                            
    Precondition Violations (10)
    Row Violation
    1Expression textField is a field being modified, and thus it cannot be parameterized
    2Expression mTextField is a field being modified, and thus it cannot be parameterized
    3Expression textField.addActionListener(this) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    4Expression init() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    5Expression textField.addActionListener(this) 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 textField.addActionListener(this) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    8Expression init() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    9Expression textField.addActionListener(this) is a void method call, and thus it cannot be parameterized
    10Expression init() is a void method call, and thus it cannot be parameterized