GridBagConstraints cons = new GridBagConstraints(); cons.gridy = y++; cons.gridheight = 1; cons.gridwidth = cons.REMAINDER; cons.fill = GridBagConstraints.BOTH; cons.anchor = GridBagConstraints.WEST; cons.weightx = 1.0f; cons.insets = new Insets(1,0,1,0); gridBag.setConstraints(box,cons); add(box);
GridBagConstraints cons = new GridBagConstraints(); cons.gridy = y++; cons.gridheight = 1; cons.gridwidth = cons.REMAINDER; cons.fill = fill; cons.anchor = GridBagConstraints.WEST; cons.weightx = 1.0f; cons.insets = new Insets(1,0,1,0); gridBag.setConstraints(comp,cons); add(comp);
Clone fragments detected by clone detection tool
File path: /jEdit-4.2/src/org/gjt/sp/jedit/AbstractOptionPane.java File path: /jEdit-4.2/src/org/gjt/sp/jedit/AbstractOptionPane.java
Method name: void addSeparator(String) Method name: void addComponent(Component, int)
Number of AST nodes: 10 Number of AST nodes: 10
1
GridBagConstraints cons = new GridBagConstraints();
1
GridBagConstraints cons = new GridBagConstraints();
2
		cons.gridy = y++;
2
		cons.gridy = y++;
3
		cons.gridheight = 1;
3
		cons.gridheight = 1;
4
		cons.gridwidth = cons.REMAINDER;
4
		cons.gridwidth = cons.REMAINDER;
5
		cons.fill = GridBagConstraints.BOTH;
5
		cons.fill = fill;
6
		cons.anchor = GridBagConstraints.WEST;
6
		cons.anchor = GridBagConstraints.WEST;
7
		cons.weightx = 1.0f;
7
		cons.weightx = 1.0f;
8
		cons.insets = new Insets(1,0,1,0);
8
		cons.insets = new Insets(1,0,1,0);
9
		gridBag.setConstraints(box,cons);
9
		gridBag.setConstraints(comp,cons);
10
		add(box);
10
		add(comp);
Summary
Number of common nesting structure subtrees1
Number of refactorable cases1
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.0
Clones locationClones are declared in the same class
Number of node comparisons68
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements10
    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
    17
    GridBagConstraints cons = new GridBagConstraints();
    1
    GridBagConstraints cons = new GridBagConstraints();
    18
    cons.gridy = y++;
    2
    cons.gridy = y++;
    19
    cons.gridheight = 1;
    3
    cons.gridheight = 1;
    20
    cons.gridwidth = cons.REMAINDER;
    4
    cons.gridwidth = cons.REMAINDER;
    21
    cons.fill = GridBagConstraints.BOTH;
    21
    cons.fill = GridBagConstraints.BOTH;
    5
    cons.fill = fill;
    Differences
    Expression1Expression2Difference
    GridBagConstraints.BOTHfillTYPE_COMPATIBLE_REPLACEMENT
    5
    cons.fill = fill;
    22
    cons.anchor = GridBagConstraints.WEST;
    6
    cons.anchor = GridBagConstraints.WEST;
    23
    cons.weightx = 1.0f;
    7
    cons.weightx = 1.0f;
    24
    cons.insets = new Insets(1, 0, 1, 0);
    8
    cons.insets = new Insets(1, 0, 1, 0);
    25
    gridBag.setConstraints(box, cons);
    25
    gridBag.setConstraints(box, cons);
    9
    gridBag.setConstraints(comp, cons);
    Differences
    Expression1Expression2Difference
    boxcompVARIABLE_NAME_MISMATCH
    javax.swing.Boxjava.awt.ComponentSUBCLASS_TYPE_MISMATCH
    9
    gridBag.setConstraints(comp, cons);
    26
    add(box);
    26
    add(box);
    10
    add(comp);
    Differences
    Expression1Expression2Difference
    boxcompVARIABLE_NAME_MISMATCH
    javax.swing.Boxjava.awt.ComponentSUBCLASS_TYPE_MISMATCH
    10
    add(comp);
    Precondition Violations (0)
    Row Violation