CloneSet506


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
32250.974class_body_declarations[3]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
132379
plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/codemanipulation/AddImportsOperation.java
227313
plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/codemanipulation/OrganizeImportsOperation.java
Clone Instance
1
Line Count
32
Source Line
379
Source File
plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/codemanipulation/AddImportsOperation.java

        private boolean isOfKind(TypeInfo curr, int typeKinds, boolean is50OrHigher) {
                int flags = curr.getModifiers();
                if (Flags.isAnnotation(flags)) {
                        return is50OrHigher && ((typeKinds&  SimilarElementsRequestor.ANNOTATIONS) != 0);
                }
                if (Flags.isEnum(flags)) {
                        return is50OrHigher && ((typeKinds&  SimilarElementsRequestor.ENUMS) != 0);
                }
                if (Flags.isInterface(flags)) {
                        return (typeKinds&  SimilarElementsRequestor.INTERFACES) != 0;
                }
                return (typeKinds&  SimilarElementsRequestor.CLASSES) != 0;
        }


        private boolean isVisible(TypeInfo curr) {
                int flags = curr.getModifiers();
                if (Flags.isPrivate(flags)) {
                        return false;
                }
                if (Flags.isPublic(flags) || Flags.isProtected(flags)) {
                        return true;
                }
                return curr.getPackageName().equals(fCompilationUnit.getParent().getElementName());
        }


        /**
         * @return Returns the scheduling rule for this operation
         */
        public ISchedulingRule getScheduleRule() {
                return fCompilationUnit.getJavaProject().getResource();
        }


Clone Instance
2
Line Count
27
Source Line
313
Source File
plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/codemanipulation/OrganizeImportsOperation.java

                private boolean isOfKind(TypeInfo curr, int typeKinds, boolean is50OrHigher) {
                        int flags = curr.getModifiers();
                        if (Flags.isAnnotation(flags)) {
                                return is50OrHigher && ((typeKinds&  SimilarElementsRequestor.ANNOTATIONS) != 0);
                        }
                        if (Flags.isEnum(flags)) {
                                return is50OrHigher && ((typeKinds&  SimilarElementsRequestor.ENUMS) != 0);
                        }
                        if (Flags.isInterface(flags)) {
                                return (typeKinds&  SimilarElementsRequestor.INTERFACES) != 0;
                        }
                        return (typeKinds&  SimilarElementsRequestor.CLASSES) != 0;
                }

                private boolean isVisible(TypeInfo curr) {
                        int flags = curr.getModifiers();
                        if (Flags.isPrivate(flags)) {
                                return false;
                        }
                        if (Flags.isPublic(flags) || Flags.isProtected(flags)) {
                                return true;
                        }
                        return curr.getPackageName().equals(fCurrPackage.getElementName());
                }

                public TypeInfo[][] getChoices() {
                        return fOpenChoices;
                }


Clone AbstractionParameter Count: 5Parameter Bindings

private boolean isOfKind(TypeInfo curr, int typeKinds, boolean is50OrHigher) {
  int flags = curr.getModifiers();
  if (Flags.isAnnotation(flags)) {
    return is50OrHigher && ((typeKinds&SimilarElementsRequestor.ANNOTATIONS) != 0);
  }
  if (Flags.isEnum(flags)) {
    return is50OrHigher && ((typeKinds&SimilarElementsRequestor.ENUMS) != 0);
  }
  if (Flags.isInterface(flags)) {
    return (typeKinds&SimilarElementsRequestor.INTERFACES) != 0;
  }
  return (typeKinds&SimilarElementsRequestor.CLASSES) != 0;
}

private boolean isVisible(TypeInfo curr) {
  int flags = curr.getModifiers();
  if (Flags.isPrivate(flags)) {
    return false;
  }
  if (Flags.isPublic(flags) || Flags.isProtected(flags)) {
    return true;
  }
  return curr.getPackageName().equals( [[#variablebbbf1b00]].getElementName());
}

/**
         * @return Returns the scheduling rule for this operation
         */
public [[#variablebbbf1aa0]] [[#variablebbbf1a60]]  [[#variablebbbf1a00]]() {
  return [[#variablebbbf19a0]];
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#bbbf1b00]]
fCompilationUnit.getParent() 
12[[#bbbf1b00]]
fCurrPackage 
21[[#bbbf1aa0]]
ISchedulingRule 
22[[#bbbf1aa0]]
TypeInfo 
31[[#bbbf1a60]]
32[[#bbbf1a60]]
[][] 
41[[#bbbf1a00]]
getScheduleRule 
42[[#bbbf1a00]]
getChoices 
51[[#bbbf19a0]]
fCompilationUnit.getJavaProject().getResource() 
52[[#bbbf19a0]]
fOpenChoices