CloneSet729


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
27250.962class_body_declaration
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
127617
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/CPListElement.java
227420
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/NewSourceFolderWizardPage.java
Clone Instance
1
Line Count
27
Source Line
617
Source File
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/CPListElement.java

        public static void insert(CPListElement element, List cpList) {
                int length = cpList.size();
                CPListElement[] elements = (CPListElement[]) cpList.toArray(new CPListElement[length]);
                int i = 0;
                while (i < length && elements[i].getEntryKind() != element.getEntryKind()) {
                        i++;
                }
                if (i < length) {
                        i++;
                        while (i < length && elements[i].getEntryKind() == element.getEntryKind()) {
                                i++;
                        }
                        cpList.add(i, element);
                        return;
                }

                switch (element.getEntryKind()) {
                case IClasspathEntry.CPE_SOURCE:
                        cpList.add(0, element);
                        break;
                case IClasspathEntry.CPE_CONTAINER:
                case IClasspathEntry.CPE_LIBRARY:
                case IClasspathEntry.CPE_PROJECT:
                case IClasspathEntry.CPE_VARIABLE:
                default:
                        cpList.add(element);
                        break;
              }
        }


Clone Instance
2
Line Count
27
Source Line
420
Source File
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/NewSourceFolderWizardPage.java

        private void insertAtEndOfCategory(IClasspathEntry entry, List entries) {
                int length = entries.size();
                IClasspathEntry[] elements = (IClasspathEntry[]) entries.toArray(new IClasspathEntry[length]);
                int i = 0;
                while (i < length && elements[i].getEntryKind() != entry.getEntryKind()) {
                        i++;
                }
                if (i < length) {
                        i++;
                        while (i < length && elements[i].getEntryKind() == entry.getEntryKind()) {
                                i++;
                        }
                        entries.add(i, entry);
                        return;
                }

                switch (entry.getEntryKind()) {
                case IClasspathEntry.CPE_SOURCE:
                        entries.add(0, entry);
                        break;
                case IClasspathEntry.CPE_CONTAINER:
                case IClasspathEntry.CPE_LIBRARY:
                case IClasspathEntry.CPE_PROJECT:
                case IClasspathEntry.CPE_VARIABLE:
                default:
                        entries.add(entry);
                        break;
              }
        }


Clone AbstractionParameter Count: 5Parameter Bindings

 [[#variableb4373e40]]void [[#variableb4373dc0]]( [[#variableb4373d20]]  [[#variableb4373c60]], List  [[#variableb4373be0]]) {
  int length = [[#variableb4373be0]].size();
   [[#variableb4373d20]][] elements = ( [[#variableb4373d20]][])  [[#variableb4373be0]].toArray(new [[#variableb4373d20]][length]);
  int i = 0;
  while (i < length && elements[i].getEntryKind() != [[#variableb4373c60]].getEntryKind()) {
    i++;
  }
  if (i < length) {
    i++;
    while (i < length && elements[i].getEntryKind() == [[#variableb4373c60]].getEntryKind()) {
      i++;
    }
     [[#variableb4373be0]].add(i,  [[#variableb4373c60]]);
    return;
  }
  switch ( [[#variableb4373c60]].getEntryKind()) {
    case IClasspathEntry.CPE_SOURCE:
       [[#variableb4373be0]].add(0,  [[#variableb4373c60]]);
      break;
    case IClasspathEntry.CPE_CONTAINER:
    case IClasspathEntry.CPE_LIBRARY:
    case IClasspathEntry.CPE_PROJECT:
    case IClasspathEntry.CPE_VARIABLE:
    default:
       [[#variableb4373be0]].add( [[#variableb4373c60]]);
      break;
  }
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#b4373e40]]
private 
12[[#b4373e40]]
public static 
21[[#b4373dc0]]
insertAtEndOfCategory 
22[[#b4373dc0]]
insert 
31[[#b4373d20]]
IClasspathEntry 
32[[#b4373d20]]
CPListElement 
41[[#b4373c60]]
entry 
42[[#b4373c60]]
element 
51[[#b4373be0]]
entries 
52[[#b4373be0]]
cpList