CloneSet600


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
29210.979class_body_declarations[3]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
129156
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/JavaOutlineInformationControl.java
23049
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/MethodsLabelProvider.java
Clone Instance
1
Line Count
29
Source Line
156
Source File
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/JavaOutlineInformationControl.java

                public void setShowDefiningType(boolean showDefiningType) {
                        fShowDefiningType = showDefiningType;
                }

                public boolean isShowDefiningType() {
                        return fShowDefiningType;
                }

                private IType getDefiningType(Object element) throws JavaModelException {
                        int kind = ((IJavaElement) element).getElementType();

                        if (kind != IJavaElement.METHOD && kind != IJavaElement.FIELD && kind != IJavaElement.INITIALIZER) {
                                return null;
                        }
                        IType declaringType = ((IMember) element).getDeclaringType();
                        if (kind != IJavaElement.METHOD) {
                                return declaringType;
                        }
                        ITypeHierarchy hierarchy = getSuperTypeHierarchy(declaringType);
                        if (hierarchy == null) {
                                return declaringType;
                        }
                        IMethod method = (IMethod) element;
                        MethodOverrideTester tester = new MethodOverrideTester(declaringType, hierarchy);
                        IMethod res = tester.findDeclaringMethod(method, true);
                        if (res == null || method.equals(res)) {
                                return declaringType;
                        }
                        return res.getDeclaringType();
                }


Clone Instance
2
Line Count
30
Source Line
49
Source File
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/MethodsLabelProvider.java

        public void setShowDefiningType(boolean showDefiningType) {
                fShowDefiningType = showDefiningType;
        }

        public boolean isShowDefiningType() {
                return fShowDefiningType;
        }


        private IType getDefiningType(Object element) throws JavaModelException {
                int kind = ((IJavaElement) element).getElementType();

                if (kind != IJavaElement.METHOD && kind != IJavaElement.FIELD && kind != IJavaElement.INITIALIZER) {
                        return null;
                }
                IType declaringType = ((IMember) element).getDeclaringType();
                if (kind != IJavaElement.METHOD) {
                        return declaringType;
                }
                ITypeHierarchy hierarchy = fHierarchy.getHierarchy();
                if (hierarchy == null) {
                        return declaringType;
                }
                IMethod method = (IMethod) element;
                MethodOverrideTester tester = new MethodOverrideTester(declaringType, hierarchy);
                IMethod res = tester.findDeclaringMethod(method, true);
                if (res == null || method.equals(res)) {
                        return declaringType;
                }
                return res.getDeclaringType();
        }


Clone AbstractionParameter Count: 1Parameter Bindings

public void setShowDefiningType(boolean showDefiningType) {
  fShowDefiningType = showDefiningType;
}

public boolean isShowDefiningType() {
  return fShowDefiningType;
}

private IType getDefiningType(Object element) throws JavaModelException {
  int kind = ((IJavaElement) element).getElementType();
  if (kind != IJavaElement.METHOD && kind != IJavaElement.FIELD && kind != IJavaElement.INITIALIZER) {
    return null;
  }
  IType declaringType = ((IMember) element).getDeclaringType();
  if (kind != IJavaElement.METHOD) {
    return declaringType;
  }
  ITypeHierarchy hierarchy = [[#variablebad5f680]];
  if (hierarchy == null) {
    return declaringType;
  }
  IMethod method = (IMethod) element;
  MethodOverrideTester tester = new MethodOverrideTester(declaringType, hierarchy);
  IMethod res = tester.findDeclaringMethod(method, true);
  if (res == null || method.equals(res)) {
    return declaringType;
  }
  return res.getDeclaringType();
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#bad5f680]]
getSuperTypeHierarchy(declaringType) 
12[[#bad5f680]]
fHierarchy.getHierarchy()