Program: 9300
Project: 9300
Buggy source:
private void convertToPointcutDeclaration(MethodDeclaration methodDeclaration,ClassScope scope){
  TypeDeclaration typeDecl=(TypeDeclaration)typeStack.peek();
  if (typeDecl.binding != null) {
    if (!typeDecl.binding.isClass()) {
      methodDeclaration.scope.problemReporter().signalError(methodDeclaration.sourceStart,methodDeclaration.sourceEnd,"String_Node_Str");
    }
  }
  if (methodDeclaration.thrownExceptions != null && methodDeclaration.thrownExceptions.length > 0) {
    methodDeclaration.scope.problemReporter().signalError(methodDeclaration.sourceStart,methodDeclaration.sourceEnd,"String_Node_Str");
  }
  PointcutDeclaration pcDecl=new PointcutDeclaration(unit.compilationResult);
  copyAllFields(methodDeclaration,pcDecl);
  if (ajAnnotations.hasAdviceAnnotation) {
    methodDeclaration.scope.problemReporter().disallowedTargetForAnnotation(ajAnnotations.adviceAnnotation);
  }
  if (ajAnnotations.hasAspectAnnotation) {
    methodDeclaration.scope.problemReporter().disallowedTargetForAnnotation(ajAnnotations.aspectAnnotation);
  }
  if (ajAnnotations.hasAdviceNameAnnotation) {
    methodDeclaration.scope.problemReporter().disallowedTargetForAnnotation(ajAnnotations.adviceNameAnnotation);
  }
  boolean containsIfPcd=false;
  int[] pcLocation=new int[2];
  String pointcutExpression=getStringLiteralFor("String_Node_Str",ajAnnotations.pointcutAnnotation,pcLocation);
  try {
    ISourceContext context=new EclipseSourceContext(unit.compilationResult,pcLocation[0]);
    Pointcut pc=new PatternParser(pointcutExpression,context).parsePointcut();
    pcDecl.pointcutDesignator=new PointcutDesignator(pc);
    pcDecl.setGenerateSyntheticPointcutMethod();
    TypeDeclaration onType=(TypeDeclaration)typeStack.peek();
    pcDecl.postParse(onType);
    EclipseFactory factory=EclipseFactory.fromScopeLookupEnvironment(methodDeclaration.scope);
    int argsLength=methodDeclaration.arguments == null ? 0 : methodDeclaration.arguments.length;
    FormalBinding[] bindings=new FormalBinding[argsLength];
    for (int i=0, len=bindings.length; i < len; i++) {
      Argument arg=methodDeclaration.arguments[i];
      String name=new String(arg.name);
      UnresolvedType type=factory.fromBinding(methodDeclaration.binding.parameters[i]);
      bindings[i]=new FormalBinding(type,name,i,arg.sourceStart,arg.sourceEnd,"String_Node_Str");
    }
    swap(onType,methodDeclaration,pcDecl);
    pc.resolve(new EclipseScope(bindings,methodDeclaration.scope));
    HasIfPCDVisitor ifFinder=new HasIfPCDVisitor();
    pc.traverse(ifFinder,null);
    containsIfPcd=ifFinder.containsIfPcd;
  }
 catch (  ParserException pEx) {
    methodDeclaration.scope.problemReporter().parseError(pcLocation[0] + pEx.getLocation().getStart(),pcLocation[0] + pEx.getLocation().getEnd(),-1,pointcutExpression.toCharArray(),pointcutExpression,new String[]{pEx.getMessage()});
  }
  boolean returnsVoid=false;
  boolean returnsBoolean=false;
  if ((methodDeclaration.returnType instanceof SingleTypeReference)) {
    SingleTypeReference retType=(SingleTypeReference)methodDeclaration.returnType;
    if (CharOperation.equals(voidType,retType.token))     returnsVoid=true;
    if (CharOperation.equals(booleanType,retType.token))     returnsBoolean=true;
  }
  if (!returnsVoid && !containsIfPcd) {
    methodDeclaration.scope.problemReporter().signalError(methodDeclaration.returnType.sourceStart,methodDeclaration.returnType.sourceEnd,"String_Node_Str");
  }
  if (!returnsBoolean && containsIfPcd) {
    methodDeclaration.scope.problemReporter().signalError(methodDeclaration.returnType.sourceStart,methodDeclaration.returnType.sourceEnd,"String_Node_Str");
  }
  if (methodDeclaration.statements != null && methodDeclaration.statements.length > 0 && !containsIfPcd) {
    methodDeclaration.scope.problemReporter().signalError(methodDeclaration.returnType.sourceStart,methodDeclaration.returnType.sourceEnd,"String_Node_Str");
  }
}

Fixed version (ground truth):
private void convertToPointcutDeclaration(MethodDeclaration methodDeclaration,ClassScope scope){
  TypeDeclaration typeDecl=(TypeDeclaration)typeStack.peek();
  if (typeDecl.binding != null) {
    if (!typeDecl.binding.isClass()) {
      methodDeclaration.scope.problemReporter().signalError(methodDeclaration.sourceStart,methodDeclaration.sourceEnd,"String_Node_Str");
    }
  }
  if (methodDeclaration.thrownExceptions != null && methodDeclaration.thrownExceptions.length > 0) {
    methodDeclaration.scope.problemReporter().signalError(methodDeclaration.sourceStart,methodDeclaration.sourceEnd,"String_Node_Str");
  }
  PointcutDeclaration pcDecl=new PointcutDeclaration(unit.compilationResult);
  copyAllFields(methodDeclaration,pcDecl);
  if (ajAnnotations.hasAdviceAnnotation) {
    methodDeclaration.scope.problemReporter().disallowedTargetForAnnotation(ajAnnotations.adviceAnnotation);
  }
  if (ajAnnotations.hasAspectAnnotation) {
    methodDeclaration.scope.problemReporter().disallowedTargetForAnnotation(ajAnnotations.aspectAnnotation);
  }
  if (ajAnnotations.hasAdviceNameAnnotation) {
    methodDeclaration.scope.problemReporter().disallowedTargetForAnnotation(ajAnnotations.adviceNameAnnotation);
  }
  boolean containsIfPcd=false;
  int[] pcLocation=new int[2];
  String pointcutExpression=getStringLiteralFor("String_Node_Str",ajAnnotations.pointcutAnnotation,pcLocation);
  try {
    ISourceContext context=new EclipseSourceContext(unit.compilationResult,pcLocation[0]);
    Pointcut pc=new PatternParser(pointcutExpression,context).parsePointcut();
    pcDecl.pointcutDesignator=new PointcutDesignator(pc);
    pcDecl.setGenerateSyntheticPointcutMethod();
    TypeDeclaration onType=(TypeDeclaration)typeStack.peek();
    pcDecl.postParse(onType);
    FormalBinding[] bindings=buildFormalAdviceBindingsFrom(methodDeclaration);
    swap(onType,methodDeclaration,pcDecl);
    pc.resolve(new EclipseScope(bindings,methodDeclaration.scope));
    HasIfPCDVisitor ifFinder=new HasIfPCDVisitor();
    pc.traverse(ifFinder,null);
    containsIfPcd=ifFinder.containsIfPcd;
  }
 catch (  ParserException pEx) {
    methodDeclaration.scope.problemReporter().parseError(pcLocation[0] + pEx.getLocation().getStart(),pcLocation[0] + pEx.getLocation().getEnd(),-1,pointcutExpression.toCharArray(),pointcutExpression,new String[]{pEx.getMessage()});
  }
  boolean returnsVoid=false;
  boolean returnsBoolean=false;
  if ((methodDeclaration.returnType instanceof SingleTypeReference)) {
    SingleTypeReference retType=(SingleTypeReference)methodDeclaration.returnType;
    if (CharOperation.equals(voidType,retType.token))     returnsVoid=true;
    if (CharOperation.equals(booleanType,retType.token))     returnsBoolean=true;
  }
  if (!returnsVoid && !containsIfPcd) {
    methodDeclaration.scope.problemReporter().signalError(methodDeclaration.returnType.sourceStart,methodDeclaration.returnType.sourceEnd,"String_Node_Str");
  }
  if (!returnsBoolean && containsIfPcd) {
    methodDeclaration.scope.problemReporter().signalError(methodDeclaration.returnType.sourceStart,methodDeclaration.returnType.sourceEnd,"String_Node_Str");
  }
  if (methodDeclaration.statements != null && methodDeclaration.statements.length > 0 && !containsIfPcd) {
    methodDeclaration.scope.problemReporter().signalError(methodDeclaration.returnType.sourceStart,methodDeclaration.returnType.sourceEnd,"String_Node_Str");
  }
}