Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
34 | 2 | 2 | 0.959 | executable_statement |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 34 | 794 | plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/DefaultBindingResolver.java |
2 | 34 | 1004 | plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/DefaultBindingResolver.java |
| ||||
{ QualifiedTypeReference qualifiedTypeReference = (QualifiedTypeReference) node; if (qualifiedTypeReference.resolvedType == null) { return null; } if (index == qualifiedTypeReference.tokens.length) { if ( !qualifiedTypeReference.resolvedType.isValidBinding() && qualifiedTypeReference instanceof JavadocQualifiedTypeReference) { JavadocQualifiedTypeReference typeRef = (JavadocQualifiedTypeReference) node; if (typeRef.packageBinding != null) { return null; } } return this.getTypeBinding(qualifiedTypeReference.resolvedType.leafComponentType()); } else { if (index >= 0) { BlockScope internalScope = (BlockScope) this.astNodesToBlockScope.get(name); Binding binding = null; try { if (internalScope == null) { if (this.scope == null) return null; binding = this.scope.getTypeOrPackage(CharOperation.subarray(qualifiedTypeReference.tokens, 0, index)); } else { binding = internalScope.getTypeOrPackage(CharOperation.subarray(qualifiedTypeReference.tokens, 0, index)); } } catch (AbortCompilation e) { // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=53357 } if (binding instanceof org.eclipse.jdt.internal.compiler.lookup.PackageBinding) { return null; } else if (binding instanceof org.eclipse.jdt.internal.compiler.lookup.TypeBinding) { // it is a type return this.getTypeBinding((org.eclipse.jdt.internal.compiler.lookup.TypeBinding) binding); } else { return null; } } } } |
| ||||
{ QualifiedTypeReference qualifiedTypeReference = (QualifiedTypeReference) node; if (qualifiedTypeReference.resolvedType == null) { return null; } if (index == qualifiedTypeReference.tokens.length) { if ( !qualifiedTypeReference.resolvedType.isValidBinding() && qualifiedTypeReference instanceof JavadocQualifiedTypeReference) { JavadocQualifiedTypeReference typeRef = (JavadocQualifiedTypeReference) node; if (typeRef.packageBinding != null) { return getPackageBinding(typeRef.packageBinding); } } return this.getTypeBinding(qualifiedTypeReference.resolvedType.leafComponentType()); } else { if (index >= 0) { BlockScope internalScope = (BlockScope) this.astNodesToBlockScope.get(name); Binding binding = null; try { if (internalScope == null) { if (this.scope == null) return null; binding = this.scope.getTypeOrPackage(CharOperation.subarray(qualifiedTypeReference.tokens, 0, index)); } else { binding = internalScope.getTypeOrPackage(CharOperation.subarray(qualifiedTypeReference.tokens, 0, index)); } } catch (AbortCompilation e) { // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=53357 } if (binding instanceof org.eclipse.jdt.internal.compiler.lookup.PackageBinding) { return this.getPackageBinding((org.eclipse.jdt.internal.compiler.lookup.PackageBinding) binding); } else if (binding instanceof org.eclipse.jdt.internal.compiler.lookup.TypeBinding) { // it is a type return this.getTypeBinding((org.eclipse.jdt.internal.compiler.lookup.TypeBinding) binding); } else { return null; } } } } |
| |||
{ QualifiedTypeReference qualifiedTypeReference = (QualifiedTypeReference) node; if (qualifiedTypeReference.resolvedType == null) { return null; } if (index == qualifiedTypeReference.tokens.length) { if ( !qualifiedTypeReference.resolvedType.isValidBinding() && qualifiedTypeReference instanceof JavadocQualifiedTypeReference) { JavadocQualifiedTypeReference typeRef = (JavadocQualifiedTypeReference) node; if (typeRef.packageBinding != null) { return [[#variable55dd7860]]; } } return this.getTypeBinding(qualifiedTypeReference.resolvedType.leafComponentType()); } else { if (index >= 0) { BlockScope internalScope = (BlockScope) this.astNodesToBlockScope.get(name); Binding binding = null; try { if (internalScope == null) { if (this.scope == null) return null; binding = this.scope.getTypeOrPackage(CharOperation.subarray(qualifiedTypeReference.tokens, 0, index)); } else { binding = internalScope.getTypeOrPackage(CharOperation.subarray(qualifiedTypeReference.tokens, 0, index)); } } catch (AbortCompilation e) { // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=53357 } if (binding instanceof org.eclipse.jdt.internal.compiler.lookup.PackageBinding) { return [[#variable55dd77e0]]; } else if (binding instanceof org.eclipse.jdt.internal.compiler.lookup.TypeBinding) { // it is a type return this.getTypeBinding((org.eclipse.jdt.internal.compiler.lookup.TypeBinding) binding); } else { return null; } } } } |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#55dd7860]] | null |
1 | 2 | [[#55dd7860]] | getPackageBinding(typeRef.packageBinding) |
2 | 1 | [[#55dd77e0]] | null |
2 | 2 | [[#55dd77e0]] | this.getPackageBinding((org.eclipse.jdt.internal.compiler.lookup.PackageBinding) binding) |