CloneSet799


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
22250.968statement_sequence[7]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
122353
plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/jres/JREsComboBlock.java
222471
plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/jres/JREsComboBlock.java
Clone Instance
1
Line Count
22
Source Line
353
Source File
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));


Clone Instance
2
Line Count
22
Source Line
471
Source File
plugins/org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui/jres/JREsComboBlock.java

                // 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));


Clone AbstractionParameter Count: 5Parameter Bindings

// 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 Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#64096100]]
fEnvironments 
12[[#64096100]]
fVMs 
21[[#be4cf360]]
IExecutionEnvironment 
22[[#be4cf360]]
IVMInstall 
31[[#b93106e0]]
getId 
32[[#b93106e0]]
getName 
41[[#64096560]]
env 
42[[#64096560]]
vm 
51[[#be4cfae0]]
fEnvironmentsCombo 
52[[#be4cfae0]]
fCombo