String[] encodings = MiscUtilities.getEncodings();
Arrays.sort(encodings,new MiscUtilities.StringICaseCompare());
encoding = new JComboBox(encodings);
encoding.setEditable(true);
String[] encodings = MiscUtilities.getEncodings();
Arrays.sort(encodings,new MiscUtilities.StringICaseCompare());
encoding = new JComboBox(encodings);
encoding.setEditable(true);
Clone fragments detected by clone detection tool
File path: /jEdit-4.2/src/org/gjt/sp/jedit/gui/BufferOptions.java
|
|
File path: /jEdit-4.2/src/org/gjt/sp/jedit/options/GeneralOptionPane.java
|
Method name: void BufferOptions(View, Buffer)
|
|
Method name: void _init()
|
Number of AST nodes: 4
|
|
Number of AST nodes: 4
|
|
1 | String[] encodings = MiscUtilities.getEncodings();
↵ | | 1 | String[] encodings = MiscUtilities.getEncodings();↵
|
2 | Arrays.sort(encodings,new MiscUtilities.StringICaseCompare());
↵ | | 2 | Arrays.sort(encodings,new MiscUtilities.StringICaseCompare());↵
|
3 | encoding = new JComboBox(encodings);
↵ | | 3 | encoding = new JComboBox(encodings);↵
|
4 | encoding.setEditable(true); | | 4 | encoding.setEditable(true);
|
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 in different classes having the same super class |
Number of node comparisons | 10 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 4 |
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 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
23 | String[] encodings = MiscUtilities.getEncodings(); | | 11 | String[] encodings = MiscUtilities.getEncodings(); |
24 | Arrays.sort(encodings, new MiscUtilities.StringICaseCompare()); | | 12 | Arrays.sort(encodings, new MiscUtilities.StringICaseCompare()); |
25 | encoding = new JComboBox(encodings); | | 13 | encoding = new JComboBox(encodings); |
26 | encoding.setEditable(true); | | 14 | encoding.setEditable(true); |
Precondition Violations (0)
Row |
Violation |