Program: 185403
Project: 185403
Buggy source:
protected <N extends ASTNode>N assertDeclaration(String contents,int exprStart,int exprEnd,String expectedDeclaringType,String declarationName,DeclarationKind kind){
  assertDeclaringType(contents,exprStart,exprEnd,expectedDeclaringType,false,false);
  GroovyCompilationUnit unit=createUnit("String_Node_Str",contents);
  SearchRequestor requestor=doVisit(exprStart,exprEnd,unit,false);
switch (kind) {
case CLASS:
    assertTrue("String_Node_Str" + requestor.result.declaration,requestor.result.declaration instanceof ClassNode);
  assertEquals("String_Node_Str",declarationName,((ClassNode)requestor.result.declaration).getName());
break;
case FIELD:
assertTrue("String_Node_Str" + requestor.result.declaration,requestor.result.declaration instanceof FieldNode);
assertEquals("String_Node_Str",declarationName,((FieldNode)requestor.result.declaration).getName());
break;
case METHOD:
assertTrue("String_Node_Str" + requestor.result.declaration,requestor.result.declaration instanceof MethodNode);
assertEquals("String_Node_Str",declarationName,((MethodNode)requestor.result.declaration).getName());
break;
case PROPERTY:
assertTrue("String_Node_Str" + requestor.result.declaration,requestor.result.declaration instanceof PropertyNode);
assertEquals("String_Node_Str",declarationName,((PropertyNode)requestor.result.declaration).getName());
break;
case VARIABLE:
assertTrue("String_Node_Str" + requestor.result.declaration,requestor.result.declaration instanceof Variable && !(requestor.result.declaration instanceof FieldNode || requestor.result.declaration instanceof PropertyNode));
assertEquals("String_Node_Str",declarationName,((Variable)requestor.result.declaration).getName());
break;
}
@SuppressWarnings("String_Node_Str") N decl=(N)requestor.result.declaration;
return decl;
}

Fixed version (ground truth):
protected <N extends ASTNode>N assertDeclaration(String contents,int exprStart,int exprEnd,String expectedDeclaringType,String declarationName,DeclarationKind kind){
  assertDeclaringType(contents,exprStart,exprEnd,expectedDeclaringType,false,false);
  GroovyCompilationUnit unit=createUnit("String_Node_Str",contents);
  SearchRequestor requestor=doVisit(exprStart,exprEnd,unit,false);
switch (kind) {
case CLASS:
    Assert.assertTrue("String_Node_Str" + requestor.result.declaration,requestor.result.declaration instanceof ClassNode);
  Assert.assertEquals("String_Node_Str",declarationName,((ClassNode)requestor.result.declaration).getName());
break;
case FIELD:
Assert.assertTrue("String_Node_Str" + requestor.result.declaration,requestor.result.declaration instanceof FieldNode);
Assert.assertEquals("String_Node_Str",declarationName,((FieldNode)requestor.result.declaration).getName());
break;
case METHOD:
Assert.assertTrue("String_Node_Str" + requestor.result.declaration,requestor.result.declaration instanceof MethodNode);
Assert.assertEquals("String_Node_Str",declarationName,((MethodNode)requestor.result.declaration).getName());
break;
case PROPERTY:
Assert.assertTrue("String_Node_Str" + requestor.result.declaration,requestor.result.declaration instanceof PropertyNode);
Assert.assertEquals("String_Node_Str",declarationName,((PropertyNode)requestor.result.declaration).getName());
break;
case VARIABLE:
Assert.assertTrue("String_Node_Str" + requestor.result.declaration,requestor.result.declaration instanceof Variable && !(requestor.result.declaration instanceof FieldNode || requestor.result.declaration instanceof PropertyNode));
Assert.assertEquals("String_Node_Str",declarationName,((Variable)requestor.result.declaration).getName());
break;
}
@SuppressWarnings("String_Node_Str") N decl=(N)requestor.result.declaration;
return decl;
}