CloneSet652


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
24210.995class_body_declaration
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
1241535
plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/Util.java
2241654
plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/Util.java
Clone Instance
1
Line Count
24
Source Line
1535
Source File
plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/Util.java

        /**
         * Sort the comparable objects in the given collection.
         */
        private static void quickSort(Comparable[] sortedCollection, int left, int right) {
                int original_left = left;
                int original_right = right;
                Comparable mid = sortedCollection[ (left + right) / 2];
                do {
                        while (sortedCollection[left].compareTo(mid) < 0) {
                                left++;
                        }
                        while (mid.compareTo(sortedCollection[right]) < 0) {
                                right--;
                        }
                        if (left <= right) {
                                Comparable tmp = sortedCollection[left];
                                sortedCollection[left] = sortedCollection[right];
                                sortedCollection[right] = tmp;
                                left++;
                                right--;
                        }
                }
                while (  left <= right);
                if (original_left < right) {
                        quickSort(sortedCollection, original_left, right);
                }
                if (left < original_right) {
                        quickSort(sortedCollection, left, original_right);
                }
        }


Clone Instance
2
Line Count
24
Source Line
1654
Source File
plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/Util.java

        /**
         * Sort the strings in the given collection.
         */
        private static void quickSort(String[] sortedCollection, int left, int right) {
                int original_left = left;
                int original_right = right;
                String mid = sortedCollection[ (left + right) / 2];
                do {
                        while (sortedCollection[left].compareTo(mid) < 0) {
                                left++;
                        }
                        while (mid.compareTo(sortedCollection[right]) < 0) {
                                right--;
                        }
                        if (left <= right) {
                                String tmp = sortedCollection[left];
                                sortedCollection[left] = sortedCollection[right];
                                sortedCollection[right] = tmp;
                                left++;
                                right--;
                        }
                }
                while (  left <= right);
                if (original_left < right) {
                        quickSort(sortedCollection, original_left, right);
                }
                if (left < original_right) {
                        quickSort(sortedCollection, left, original_right);
                }
        }


Clone AbstractionParameter Count: 1Parameter Bindings

/**
         * Sort the comparable objects in the given collection.
         */
/**
         * Sort the strings in the given collection.
         */
private static void quickSort( [[#variablebd3fa280]][] sortedCollection, int left, int right) {
  int original_left = left;
  int original_right = right;
   [[#variablebd3fa280]] mid = sortedCollection[(left + right) / 2];
  do {
    while (sortedCollection[left].compareTo(mid) < 0) {
      left++;
    }
    while (mid.compareTo(sortedCollection[right]) < 0) {
      right--;
    }
    if (left <= right) {
       [[#variablebd3fa280]] tmp = sortedCollection[left];
      sortedCollection[left] = sortedCollection[right];
      sortedCollection[right] = tmp;
      left++;
      right--;
    }
  }
  while (left <= right);
  if (original_left < right) {
    quickSort(sortedCollection, original_left, right);
  }
  if (left < original_right) {
    quickSort(sortedCollection, left, original_right);
  }
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#bd3fa280]]
Comparable 
12[[#bd3fa280]]
String