Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
18 | 2 | 1 | 0.998 | class_body_declaration |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 18 | 296 | plugins/org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/util/JUnitStubUtility.java |
2 | 18 | 281 | plugins/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/codemanipulation/StubUtility.java |
| ||||
public static String[] getParameterTypeNamesForSeeTag(IMethod overridden) { try { ASTParser parser = ASTParser.newParser(AST.JLS3); parser.setProject(overridden.getJavaProject()); IBinding[] bindings = parser.createBindings(new IJavaElement[] { overridden }, null); if (bindings.length == 1 && bindings[0] instanceof IMethodBinding) { return getParameterTypeNamesForSeeTag((IMethodBinding) bindings[0]); } } catch (IllegalStateException e) { // method does not exist } // fall back code. Not good for generic methods! String[] paramTypes = overridden.getParameterTypes(); String[] paramTypeNames = new String[paramTypes.length]; for (int i = 0; i < paramTypes.length; i++) { paramTypeNames[i] = Signature.toString(Signature.getTypeErasure(paramTypes[i])); } return paramTypeNames; } |
| ||||
/* * Returns the parameters type names used in see tags. Currently, these are always fully qualified. */ private static String[] getParameterTypeNamesForSeeTag(IMethod overridden) { try { ASTParser parser = ASTParser.newParser(AST.JLS3); parser.setProject(overridden.getJavaProject()); IBinding[] bindings = parser.createBindings(new IJavaElement[] { overridden }, null); if (bindings.length == 1 && bindings[0] instanceof IMethodBinding) { return getParameterTypeNamesForSeeTag((IMethodBinding) bindings[0]); } } catch (IllegalStateException e) { // method does not exist } // fall back code. Not good for generic methods! String[] paramTypes = overridden.getParameterTypes(); String[] paramTypeNames = new String[paramTypes.length]; for (int i = 0; i < paramTypes.length; i++) { paramTypeNames[i] = Signature.toString(Signature.getTypeErasure(paramTypes[i])); } return paramTypeNames; } |
| |||
[[#variableb19ec6e0]]static String[] getParameterTypeNamesForSeeTag(IMethod overridden) { try { ASTParser parser = ASTParser.newParser(AST.JLS3); parser.setProject(overridden.getJavaProject()); IBinding[] bindings = parser.createBindings(new IJavaElement[] { overridden }, null); if (bindings.length == 1 && bindings[0] instanceof IMethodBinding) { return getParameterTypeNamesForSeeTag((IMethodBinding) bindings[0]); } } catch (IllegalStateException e) { // method does not exist } // fall back code. Not good for generic methods! String[] paramTypes = overridden.getParameterTypes(); String[] paramTypeNames = new String[paramTypes.length]; for (int i = 0; i < paramTypes.length; i++) { paramTypeNames[i] = Signature.toString(Signature.getTypeErasure(paramTypes[i])); } return paramTypeNames; } |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#b19ec6e0]] | public |
1 | 2 | [[#b19ec6e0]] | /* * Returns the parameters type names used in see tags. Currently, these are always fully qualified. */ private |