Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
29 | 2 | 1 | 0.979 | class_body_declarations[3] |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 29 | 156 | plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/JavaOutlineInformationControl.java |
2 | 30 | 49 | 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 = 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(); } |
| ||||
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(); } |
| |||
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 Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#bad5f680]] | getSuperTypeHierarchy(declaringType) |
1 | 2 | [[#bad5f680]] | fHierarchy.getHierarchy() |