CloneSet1407


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
18210.997class_body_declaration
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
11871
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/AddImportOnSelectionAction.java
218138
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/OrganizeImportsAction.java
Clone Instance
1
Line Count
18
Source Line
71
Source File
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/AddImportOnSelectionAction.java

        private static final class AddImportComparator implements Comparator {

                public int compare(Object o1, Object o2) {
                        if (((String) o1).equals(o2))
                                return 0;

                        History history = QualifiedTypeNameHistory.getDefault();

                        int pos1 = history.getPosition(o1);
                        int pos2 = history.getPosition(o2);

                        if (pos1 == pos2)
                                return Collator.getInstance().compare(o1, o2);

                        if (pos1 > pos2) {
                                return -1;
                        }
                        else   {
                                return 1;
                        }
                }
        }


Clone Instance
2
Line Count
18
Source Line
138
Source File
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/OrganizeImportsAction.java

        private static final class OrganizeImportComparator implements Comparator {

                public int compare(Object o1, Object o2) {
                        if (((String) o1).equals(o2))
                                return 0;

                        History history = QualifiedTypeNameHistory.getDefault();

                        int pos1 = history.getPosition(o1);
                        int pos2 = history.getPosition(o2);

                        if (pos1 == pos2)
                                return Collator.getInstance().compare(o1, o2);

                        if (pos1 > pos2) {
                                return -1;
                        }
                        else   {
                                return 1;
                        }
                }
        }


Clone AbstractionParameter Count: 1Parameter Bindings

private static final class [[#variable52ea9140]]implements Comparator {
  public int compare(Object o1, Object o2) {
    if (((String) o1).equals(o2))
      return 0;
    History history = QualifiedTypeNameHistory.getDefault();
    int pos1 = history.getPosition(o1);
    int pos2 = history.getPosition(o2);
    if (pos1 == pos2)
      return Collator.getInstance().compare(o1, o2);
    if (pos1 > pos2) {
      return -1;
    }
    else {
      return 1;
    }
  }
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#52ea9140]]
OrganizeImportComparator 
12[[#52ea9140]]
AddImportComparator