| Previous CloneSet | Next CloneSet | Back to Main Report |
| Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
|---|---|---|---|---|
| 22 | 2 | 5 | 0.968 | statement_sequence[7] |
| Clone Abstraction | Parameter Bindings |
| Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
|---|---|---|---|
| 1 | 22 | 353 | plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/jres/JREsComboBlock.java |
| 2 | 22 | 471 | plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/jres/JREsComboBlock.java |
| ||||
// sort by name
Collections.sort(fVMs, new Comparator() {
public int compare(Object o1, Object o2) {
IVMInstall left = (IVMInstall) o1;
IVMInstall right = (IVMInstall) o2;
return left.getName().compareToIgnoreCase(right.getName());
}
public boolean equals(Object obj) {
return obj == this ;
}
} );
// now make an array of names
String[] names = new String[fVMs.size()];
Iterator iter = fVMs.iterator();
int i = 0;
while (iter.hasNext()) {
IVMInstall vm = (IVMInstall) iter.next();
names[i] = vm.getName();
i++;
}
fCombo.setItems(names);
fCombo.setVisibleItemCount(Math.min(names.length, 20));
|
| ||||
// sort by name
Collections.sort(fEnvironments, new Comparator() {
public int compare(Object o1, Object o2) {
IExecutionEnvironment left = (IExecutionEnvironment) o1;
IExecutionEnvironment right = (IExecutionEnvironment) o2;
return left.getId().compareToIgnoreCase(right.getId());
}
public boolean equals(Object obj) {
return obj == this ;
}
} );
// now make an array of names
String[] names = new String[fEnvironments.size()];
Iterator iter = fEnvironments.iterator();
int i = 0;
while (iter.hasNext()) {
IExecutionEnvironment env = (IExecutionEnvironment) iter.next();
names[i] = env.getId();
i++;
}
fEnvironmentsCombo.setItems(names);
fEnvironmentsCombo.setVisibleItemCount(Math.min(names.length, 20));
|
| |||
// sort by name
Collections.sort( [[#variable64096100]], new Comparator() {
public int compare(Object o1, Object o2) {
[[#variablebe4cf360]] left = ( [[#variablebe4cf360]]) o1;
[[#variablebe4cf360]] right = ( [[#variablebe4cf360]]) o2;
return left. [[#variableb93106e0]]().compareToIgnoreCase(right. [[#variableb93106e0]]());
}
public boolean equals(Object obj) {
return obj == this ;
}
} );
// now make an array of names
String[] names = new String[ [[#variable64096100]].size()];
Iterator iter = [[#variable64096100]].iterator();
int i = 0;
while (iter.hasNext()) {
[[#variablebe4cf360]] [[#variable64096560]]= ( [[#variablebe4cf360]]) iter.next();
names[i] = [[#variable64096560]]. [[#variableb93106e0]]();
i++;
}
[[#variablebe4cfae0]].setItems(names);
[[#variablebe4cfae0]].setVisibleItemCount(Math.min(names.length, 20));
|
| CloneAbstraction |
| Parameter Index | Clone Instance | Parameter Name | Value |
|---|---|---|---|
| 1 | 1 | [[#64096100]] | fEnvironments |
| 1 | 2 | [[#64096100]] | fVMs |
| 2 | 1 | [[#be4cf360]] | IExecutionEnvironment |
| 2 | 2 | [[#be4cf360]] | IVMInstall |
| 3 | 1 | [[#b93106e0]] | getId |
| 3 | 2 | [[#b93106e0]] | getName |
| 4 | 1 | [[#64096560]] | env |
| 4 | 2 | [[#64096560]] | vm |
| 5 | 1 | [[#be4cfae0]] | fEnvironmentsCombo |
| 5 | 2 | [[#be4cfae0]] | fCombo |