super(); textField = new JPasswordField(); textField.addActionListener(this); textField.addFocusListener(this);
super(); mLabel.setText(pLabel); choiceList = new JComboBox(items); choiceList.setEditable(editable); init();
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/testbeans/gui/PasswordEditor.java File path: /jakarta-jmeter-2.3.2/src/org/apache/jorphan/gui/JLabeledChoice.java
Method name: void PasswordEditor() Method name: void JLabeledChoice(String, String[], boolean)
Number of AST nodes: 4 Number of AST nodes: 5
1
super();
1
super();
2
		textField = new JPasswordField();
3
		textField.addActionListener(this);
4
		textField.addFocusListener(this
2
		mLabel.setText(pLabel);
3
		choiceList = new JComboBox(items);
4
		choiceList.setEditable(editable);
5
);
5
		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 comparisons13
  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
    mLabel.setText(pLabel);
    2
    textField = new JPasswordField();
    2
    textField = new JPasswordField();
    3
    choiceList = new JComboBox(items);
    Differences
    Expression1Expression2Difference
    textFieldchoiceListVARIABLE_NAME_MISMATCH
    javax.swing.JPasswordFieldjavax.swing.JComboBoxSUBCLASS_TYPE_MISMATCH
    javax.swing.JPasswordFieldjavax.swing.JComboBoxSUBCLASS_TYPE_MISMATCH
    new JPasswordField()new JComboBox(items)ARGUMENT_NUMBER_MISMATCH
    Preondition Violations
    Expression textField is a field being modified, and thus it cannot be parameterized
    Expression choiceList is a field being modified, and thus it cannot be parameterized
    3
    choiceList = new JComboBox(items);
                                                                            
    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
    4
    choiceList.setEditable(editable);
    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 (11)
    Row Violation
    1Expression textField is a field being modified, and thus it cannot be parameterized
    2Expression choiceList is a field being modified, and thus it cannot be parameterized
    3Unmatched statement choiceList.setEditable(editable); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    4Expression textField.addActionListener(this) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    5Expression init() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    6Expression textField.addActionListener(this) is a void method call, and thus it cannot be parameterized
    7Expression init() is a void method call, and thus it cannot be parameterized
    8Expression textField.addActionListener(this) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    9Expression init() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    10Expression textField.addActionListener(this) is a void method call, and thus it cannot be parameterized
    11Expression init() is a void method call, and thus it cannot be parameterized