CloneSet380


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
34220.959executable_statement
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
134794
plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/DefaultBindingResolver.java
2341004
plugins/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/DefaultBindingResolver.java
Clone Instance
1
Line Count
34
Source Line
794
Source File
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;
                                               }
                                }
                        }
                                                                   }


Clone Instance
2
Line Count
34
Source Line
1004
Source File
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 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;
                                               }
                                }
                        }
                                                                   }


Clone AbstractionParameter Count: 2Parameter Bindings

{
  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 Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#55dd7860]]
null 
12[[#55dd7860]]
getPackageBinding(typeRef.packageBinding) 
21[[#55dd77e0]]
null 
22[[#55dd77e0]]
this.getPackageBinding((org.eclipse.jdt.internal.compiler.lookup.PackageBinding) binding)