Program: 186062
Project: 186062
Buggy source:
public VisitStatus acceptASTNode(ASTNode node,TypeLookupResult result,IJavaElement enclosingElement){
  if (node instanceof ClassExpression || node instanceof ClassNode || node instanceof ImportNode|| node instanceof AnnotationNode) {
    ASTNode noArray;
    if (node instanceof ClassNode) {
      noArray=removeArray((ClassNode)node);
    }
 else {
      noArray=node;
    }
    ClassNode type=result.type;
    if (node instanceof ClassExpression && type == VariableScope.CLASS_CLASS_NODE) {
      type=((ClassExpression)node).getType();
    }
    if (type != null) {
      String qualifiedName=removeArray(type).getName();
      if (qualifiedNameMatches(qualifiedName) && noArray.getEnd() > 0) {
        int start;
        int end;
        if (node instanceof ImportNode) {
          node=((ImportNode)node).getType();
          start=node.getStart();
          end=node.getEnd();
        }
 else         if (node instanceof ClassExpression) {
          start=node.getStart();
          end=start + ((ClassExpression)node).getType().getNameWithoutPackage().length();
        }
 else         if (node instanceof ClassNode) {
          node=maybeGetComponentType((ClassNode)node);
          start=node.getStart();
          end=start + ((ClassNode)node).getNameWithoutPackage().length();
        }
 else {
          start=node.getStart();
          end=node.getEnd();
        }
        SearchMatch match=new SearchMatch(enclosingElement,getAccuracy(result.confidence),start,end - start,participant,enclosingElement.getResource());
        try {
          requestor.acceptSearchMatch(match);
        }
 catch (        CoreException e) {
          Util.log(e,"String_Node_Str" + enclosingElement);
        }
      }
    }
  }
  return VisitStatus.CONTINUE;
}

Fixed version (ground truth):
public VisitStatus acceptASTNode(ASTNode node,TypeLookupResult result,IJavaElement enclosingElement){
  if (node instanceof ClassExpression || node instanceof ClassNode || node instanceof ImportNode|| node instanceof AnnotationNode|| node instanceof ConstructorNode) {
    ASTNode noArray;
    if (node instanceof ClassNode) {
      noArray=removeArray((ClassNode)node);
    }
 else     if (node instanceof ConstructorNode) {
      noArray=((ConstructorNode)node).getDeclaringClass();
    }
 else {
      noArray=node;
    }
    ClassNode type;
    if (node instanceof ConstructorNode) {
      type=((ConstructorNode)node).getDeclaringClass();
    }
 else {
      type=result.type;
    }
    if (node instanceof ClassExpression && type == VariableScope.CLASS_CLASS_NODE) {
      type=((ClassExpression)node).getType();
    }
    if (type != null) {
      String qualifiedName=removeArray(type).getName();
      if (qualifiedNameMatches(qualifiedName) && noArray.getEnd() > 0) {
        int start;
        int end;
        if (node instanceof ImportNode) {
          node=((ImportNode)node).getType();
          start=node.getStart();
          end=node.getEnd();
        }
 else         if (node instanceof ClassExpression) {
          start=node.getStart();
          end=start + ((ClassExpression)node).getType().getNameWithoutPackage().length();
        }
 else         if (node instanceof ClassNode) {
          node=maybeGetComponentType((ClassNode)node);
          start=node.getStart();
          end=start + ((ClassNode)node).getNameWithoutPackage().length();
        }
 else         if (node instanceof ConstructorNode) {
          start=((ConstructorNode)node).getNameStart();
          end=((ConstructorNode)node).getNameEnd() + 1;
        }
 else {
          start=node.getStart();
          end=node.getEnd();
        }
        SearchMatch match=new SearchMatch(enclosingElement,getAccuracy(result.confidence),start,end - start,participant,enclosingElement.getResource());
        try {
          requestor.acceptSearchMatch(match);
        }
 catch (        CoreException e) {
          Util.log(e,"String_Node_Str" + enclosingElement);
        }
      }
    }
  }
  return VisitStatus.CONTINUE;
}