CloneSet915


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
22201.000statement_sequence[2]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
12264
plugins/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionOnQualifiedNameReference.java
22354
plugins/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionOnSingleNameReference.java
Clone Instance
1
Line Count
22
Source Line
64
Source File
plugins/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionOnQualifiedNameReference.java

        if ( !binding.isValidBinding()) {
                if (binding instanceof ProblemFieldBinding) {
                        // tolerate some error cases
                        if (binding.problemId() == ProblemReasons.NotVisible ||
                                           binding.problemId() == ProblemReasons.InheritedNameHidesEnclosingName ||
                                           binding.problemId() == ProblemReasons.NonStaticReferenceInConstructorInvocation ||
                                           binding.problemId() == ProblemReasons.NonStaticReferenceInStaticContext) {
                                throw new SelectionNodeFound(binding);
                        }
                        scope.problemReporter().invalidField(this, (FieldBinding) binding);
                }
                else   if (binding instanceof ProblemReferenceBinding) {
                        // tolerate some error cases
                        if (binding.problemId() == ProblemReasons.NotVisible) {
                                throw new SelectionNodeFound(binding);
                        }
                        scope.problemReporter().invalidType(this, (TypeBinding) binding);
                       }
                       else {
                        scope.problemReporter().unresolvableReference(this, binding);
                       }
                throw new SelectionNodeFound();
        }
        throw new SelectionNodeFound(binding);


Clone Instance
2
Line Count
23
Source Line
54
Source File
plugins/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionOnSingleNameReference.java

        if ( !binding.isValidBinding()) {
                if (binding instanceof ProblemFieldBinding) {
                        // tolerate some error cases
                        if (binding.problemId() == ProblemReasons.NotVisible ||
                                           binding.problemId() == ProblemReasons.InheritedNameHidesEnclosingName ||
                                           binding.problemId() == ProblemReasons.NonStaticReferenceInConstructorInvocation ||
                                           binding.problemId() == ProblemReasons.NonStaticReferenceInStaticContext) {
                                throw new SelectionNodeFound(binding);
                        }
                        scope.problemReporter().invalidField(this, (FieldBinding) binding);
                }
                else   if (binding instanceof ProblemReferenceBinding) {
                        // tolerate some error cases
                        if (binding.problemId() == ProblemReasons.NotVisible) {
                                throw new SelectionNodeFound(binding);
                        }
                        scope.problemReporter().invalidType(this, (TypeBinding) binding);
                       }
                       else {
                        scope.problemReporter().unresolvableReference(this, binding);
                       }
                throw new SelectionNodeFound();
        }
        throw new SelectionNodeFound(binding);


Clone AbstractionParameter Count: 0Parameter Bindings

if ( !binding.isValidBinding()) {
  if (binding instanceof ProblemFieldBinding) {
    // tolerate some error cases
    if (binding.problemId() == ProblemReasons.NotVisible || binding.problemId() == ProblemReasons.InheritedNameHidesEnclosingName || binding.problemId() == ProblemReasons.NonStaticReferenceInConstructorInvocation || binding.problemId() == ProblemReasons.NonStaticReferenceInStaticContext) {
      throw new SelectionNodeFound(binding);
    }
    scope.problemReporter().invalidField(this, (FieldBinding) binding);
  }
  else
    if (binding instanceof ProblemReferenceBinding) {
      // tolerate some error cases
      if (binding.problemId() == ProblemReasons.NotVisible) {
        throw new SelectionNodeFound(binding);
      }
      scope.problemReporter().invalidType(this, (TypeBinding) binding);
    }
    else {
      scope.problemReporter().unresolvableReference(this, binding);
    }
  throw new SelectionNodeFound();
}
throw new SelectionNodeFound(binding);
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
None