GridBagConstraints cons = new GridBagConstraints();
cons.gridy = y++;
cons.gridheight = 1;
cons.gridwidth = cons.REMAINDER;
cons.fill = GridBagConstraints.NONE;
cons.anchor = GridBagConstraints.WEST;
cons.weightx = 1.0f;
cons.insets = new Insets(1,0,1,0);
gridBag.setConstraints(comp,cons);
add(comp);
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 addComponent(Component)
|
|
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.NONE;↵ | | 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(comp,cons);↵ | | 9 | gridBag.setConstraints(comp,cons);↵
|
10 | add(comp); | | 10 | add(comp);
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.0 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 68 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 10 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 0.0 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
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.NONE; | | 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(comp, cons); | | 9 | gridBag.setConstraints(comp, cons); |
10 | add(comp); | | 10 | add(comp); |
Precondition Violations (0)
Row |
Violation |