Program: 61524
Project: 61524
Buggy source:
@Test public void testBugNPE(){
  File projectLocation=new File("String_Node_Str");
  AstorMain main1=new AstorMain();
  Launcher launcher=new Launcher();
  launcher.addInputResource("String_Node_Str");
  Factory factory=launcher.createFactory();
  factory.getEnvironment().setComplianceLevel(6);
  SpoonCompiler compiler=launcher.createCompiler(factory);
  compiler.setSourceClasspath(dep.split(File.pathSeparator));
  compiler.addInputSource(new File(projectLocation.getAbsolutePath()));
  compiler.build();
  List<CtType<?>> types=factory.Type().getAll();
  assertTrue(types.size() > 0);
  log.info(types.get(0).toString());
  CtType<?> type1=types.stream().filter(x -> x.getSimpleName().equals("String_Node_Str")).findFirst().get();
  CtType<?> type2=types.stream().filter(x -> x.getSimpleName().equals("String_Node_Str")).findFirst().get();
  System.out.println(type1);
  System.out.println(type2);
  CtMethod mt=type2.getAllMethods().stream().filter(x -> x.getSimpleName().equals("String_Node_Str")).findFirst().get();
  System.out.println(mt);
  CtStatement st=mt.getBody().getStatement(0);
  List<CtVariable> vars1=st.getElements(new VarFilter());
  System.out.println(vars1);
  CtMethod mt2=type2.getAllMethods().stream().filter(x -> x.getSimpleName().equals("String_Node_Str")).findFirst().get();
  CtStatement st2=mt2.getBody().getStatement(1);
  ClassLoader classLoader=getClass().getClassLoader();
  File learningDir=new File(classLoader.getResource("String_Node_Str").getFile());
  ConfigurationProperties.setProperty("String_Node_Str",learningDir.getAbsolutePath());
  VarMapping vm=VariableResolver.mapVariables(vars1,st2);
  System.out.println("String_Node_Str" + vm.getMappedVariables());
}

Fixed version (ground truth):
@Test public void testBugNPE(){
  File projectLocation=new File("String_Node_Str");
  Launcher launcher=new Launcher();
  launcher.addInputResource("String_Node_Str");
  Factory factory=launcher.createFactory();
  factory.getEnvironment().setComplianceLevel(6);
  SpoonCompiler compiler=launcher.createCompiler(factory);
  compiler.setSourceClasspath(dep.split(File.pathSeparator));
  compiler.addInputSource(new File(projectLocation.getAbsolutePath()));
  compiler.build();
  ClassLoader classLoader=getClass().getClassLoader();
  File learningDir=new File(classLoader.getResource("String_Node_Str").getFile());
  ConfigurationProperties.setProperty("String_Node_Str",learningDir.getAbsolutePath());
  List<CtType<?>> types=factory.Type().getAll();
  assertTrue(types.size() > 0);
  CtType<?> type1=types.stream().filter(x -> x.getSimpleName().equals("String_Node_Str")).findFirst().get();
  CtType<?> type2=types.stream().filter(x -> x.getSimpleName().equals("String_Node_Str")).findFirst().get();
  CtMethod mt1=type2.getAllMethods().stream().filter(x -> x.getSimpleName().equals("String_Node_Str")).findFirst().get();
  CtStatement st=mt1.getBody().getStatement(0);
  List<CtVariable> varsContext=st.getElements(new VarFilter());
  CtMethod mt2=type2.getAllMethods().stream().filter(x -> x.getSimpleName().equals("String_Node_Str")).findFirst().get();
  CtStatement st2=mt2.getBody().getStatement(1);
  System.out.println("String_Node_Str" + varsContext + "String_Node_Str"+ st2);
  VarMapping vm=VariableResolver.mapVariables(varsContext,st2);
  assertTrue(vm.getMappedVariables().isEmpty());
  System.out.println("String_Node_Str" + vm.getMappedVariables());
  System.out.println("String_Node_Str");
  CtMethod mt3=type2.getAllMethods().stream().filter(x -> x.getSimpleName().equals("String_Node_Str")).findFirst().get();
  System.out.println(mt3);
  CtStatement ingredient=mt3.getBody().getStatement(0);
  System.out.println("String_Node_Str" + varsContext + "String_Node_Str"+ ingredient);
  VarMapping vm3=VariableResolver.mapVariables(varsContext,ingredient);
  System.out.println("String_Node_Str" + vm3.getMappedVariables());
  assertTrue(vm3.getMappedVariables().isEmpty());
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str" + varsContext + "String_Node_Str"+ mt3.getBody().getStatement(0));
  ingredient=mt1.getBody().getStatement(0);
  VarMapping vm4=VariableResolver.mapVariables(varsContext,ingredient);
  System.out.println("String_Node_Str" + vm4.getMappedVariables());
  assertTrue(vm4.getMappedVariables().isEmpty());
  System.out.println("String_Node_Str");
  List<CtVariable> varsContext2=mt3.getBody().getStatement(1).getElements(new VarFilter());
  System.out.println(varsContext2);
  ingredient=mt1.getBody().getStatement(1);
  System.out.println("String_Node_Str" + varsContext2 + "String_Node_Str"+ ingredient);
  VarMapping vm5=VariableResolver.mapVariables(varsContext2,ingredient);
  System.out.println("String_Node_Str" + vm5.getMappedVariables());
  assertTrue(vm5.getMappedVariables().size() > 0);
}