panel.add(label); startField = new JTextField(10); cons.gridx = 1; cons.weightx = 1.0f; layout.setConstraints(startField,cons);
panel.add(label); endField = new JTextField(10); cons.gridx = 1; cons.weightx = 1.0f; layout.setConstraints(endField,cons);
Clone fragments detected by clone detection tool
File path: /jEdit-4.2/src/org/gjt/sp/jedit/gui/SelectLineRange.java File path: /jEdit-4.2/src/org/gjt/sp/jedit/gui/SelectLineRange.java
Method name: JPanel createFieldPanel() Method name: JPanel createFieldPanel()
Number of AST nodes: 5 Number of AST nodes: 5
1
panel.add(label);
1
panel.add(label);
2
		startField = new JTextField(10);
2
		endField = new JTextField(10);
3
		cons.gridx = 1;
3
		cons.gridx = 1;
4
		cons.weightx = 1.0f;
4
		cons.weightx = 1.0f;
5
		layout.setConstraints(startField,cons);
5
		layout.setConstraints(endField,cons);
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 the same method
Number of node comparisons17
  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
    10
    panel.add(label);
    21
    panel.add(label);
    11
    startField = new JTextField(10);
    11
    startField = new JTextField(10);
    22
    endField = new JTextField(10);
    Differences
    Expression1Expression2Difference
    startFieldendFieldVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression startField is a field being modified, and thus it cannot be parameterized
    Expression endField is a field being modified, and thus it cannot be parameterized
    22
    endField = new JTextField(10);
    12
    cons.gridx = 1;
    23
    cons.gridx = 1;
    13
    cons.weightx = 1.0f;
    24
    cons.weightx = 1.0f;
    14
    layout.setConstraints(startField, cons);
    14
    layout.setConstraints(startField, cons);
    25
    layout.setConstraints(endField, cons);
    Differences
    Expression1Expression2Difference
    startFieldendFieldVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression startField cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression endField cannot be parameterized, because it has dependencies to/from statements that will be extracted
    25
    layout.setConstraints(endField, cons);
    Precondition Violations (4)
    Row Violation
    1Expression startField is a field being modified, and thus it cannot be parameterized
    2Expression endField is a field being modified, and thus it cannot be parameterized
    3Expression startField cannot be parameterized, because it has dependencies to/from statements that will be extracted
    4Expression endField cannot be parameterized, because it has dependencies to/from statements that will be extracted