Program: 130634
Project: 130634
Buggy source:
public static Triple<FqlEnvironment,String,List<Throwable>> makeEnv(FQLProgram prog){
  List<Throwable> exns=new LinkedList<>();
  Map<String,Signature> sigs=new HashMap<>();
  Map<String,Mapping> maps=new HashMap<>();
  Map<String,Instance> insts=new HashMap<>();
  Map<String,Query> queries=new HashMap<>();
  Map<String,FullQuery> full_queries=new HashMap<>();
  for (  String k : prog.sigs.keySet()) {
    try {
      SigExp v=prog.sigs.get(k);
      v.typeOf(prog);
      sigs.put(k,v.toSig(prog));
    }
 catch (    RuntimeException re) {
      re.printStackTrace();
      LineException exn=new LineException(re.getLocalizedMessage(),k,"String_Node_Str");
      if (NEWDEBUG.debug.fql.continue_on_error) {
        exns.add(exn);
      }
 else {
        throw exn;
      }
    }
  }
  for (  String k : prog.maps.keySet()) {
    try {
      MapExp v=prog.maps.get(k);
      v.type(prog);
      maps.put(k,v.toMap(prog));
    }
 catch (    RuntimeException re) {
      re.printStackTrace();
      LineException exn=new LineException(re.getLocalizedMessage(),k,"String_Node_Str");
      if (NEWDEBUG.debug.fql.continue_on_error) {
        exns.add(exn);
      }
 else {
        throw exn;
      }
    }
  }
  for (  String k : prog.queries.keySet()) {
    try {
      QueryExp v=prog.queries.get(k);
      v.type(prog);
      queries.put(k,Query.toQuery(prog,v));
    }
 catch (    RuntimeException re) {
      re.printStackTrace();
      LineException exn=new LineException(re.getLocalizedMessage(),k,"String_Node_Str");
      if (NEWDEBUG.debug.fql.continue_on_error) {
        exns.add(exn);
      }
 else {
        throw exn;
      }
    }
  }
  for (  String k : prog.full_queries.keySet()) {
    try {
      FullQueryExp v=prog.full_queries.get(k);
      v.type(prog);
      full_queries.put(k,FullQuery.toQuery(prog,v));
    }
 catch (    RuntimeException re) {
      re.printStackTrace();
      LineException exn=new LineException(re.getLocalizedMessage(),k,"String_Node_Str");
      if (NEWDEBUG.debug.fql.continue_on_error) {
        exns.add(exn);
      }
 else {
        throw exn;
      }
    }
  }
  for (  String k : prog.insts.keySet()) {
    try {
      InstExp v=prog.insts.get(k);
      v.type(prog);
    }
 catch (    RuntimeException re) {
      re.printStackTrace();
      LineException exn=new LineException(re.getLocalizedMessage(),k,"String_Node_Str");
      if (NEWDEBUG.debug.fql.continue_on_error) {
        exns.add(exn);
      }
 else {
        throw exn;
      }
    }
  }
  for (  String k : prog.transforms.keySet()) {
    try {
      TransExp v=prog.transforms.get(k);
      v.type(prog);
    }
 catch (    RuntimeException re) {
      re.printStackTrace();
      LineException exn=new LineException(re.getLocalizedMessage(),k,"String_Node_Str");
      if (NEWDEBUG.debug.fql.continue_on_error) {
        exns.add(exn);
      }
 else {
        throw exn;
      }
    }
  }
  prog=rewriteQueries(prog);
  Triple<Map<String,Set<Map<Object,Object>>>,String,List<Throwable>> res=JDBCBridge.run(prog);
  exns.addAll(res.third);
  for (  String k : prog.insts.keySet()) {
    try {
      Signature s=prog.insts.get(k).type(prog).toSig(prog);
      List<Pair<String,List<Pair<Object,Object>>>> b=PSMGen.gather(k,s,res.first);
      insts.put(k,new Instance(s,b));
    }
 catch (    Exception re) {
      System.out.println("String_Node_Str" + k + "String_Node_Str"+ prog.insts.get(k));
      System.out.println(prog);
      re.printStackTrace();
      LineException exn=new LineException(re.getLocalizedMessage(),k,"String_Node_Str");
      if (NEWDEBUG.debug.fql.continue_on_error) {
        exns.add(exn);
      }
 else {
        throw exn;
      }
    }
  }
  Map<String,Transform> transforms=new HashMap<>();
  for (  String k : prog.transforms.keySet()) {
    try {
      Pair<String,String> val=prog.transforms.get(k).type(prog);
      InstExp i=prog.insts.get(val.first);
      Signature s=i.type(prog).toSig(prog);
      List<Pair<String,List<Pair<Object,Object>>>> b=PSMGen.gather(k,s,res.first);
      transforms.put(k,new Transform(insts.get(val.first),insts.get(val.second),b));
    }
 catch (    Exception re) {
      re.printStackTrace();
      LineException exn=new LineException(re.getLocalizedMessage(),k,"String_Node_Str");
      if (NEWDEBUG.debug.fql.continue_on_error) {
        exns.add(exn);
      }
 else {
        throw exn;
      }
    }
  }
  if (NEWDEBUG.debug.fql.VALIDATE_WITH_EDS) {
    try {
      validateWithEds(prog,insts);
    }
 catch (    FQLException fe) {
      fe.printStackTrace();
      throw new RuntimeException(fe.getLocalizedMessage());
    }
  }
  String toRetStr=res.second.trim();
  if (containsFullSigma(prog)) {
    toRetStr="String_Node_Str";
  }
  return new Triple<>(new FqlEnvironment(sigs,maps,insts,queries,transforms,full_queries),toRetStr,dedup(exns));
}

Fixed version (ground truth):
public static Triple<FqlEnvironment,String,List<Throwable>> makeEnv(FQLProgram prog,String[] toUpdate){
  List<Throwable> exns=new LinkedList<>();
  Map<String,Signature> sigs=new HashMap<>();
  Map<String,Mapping> maps=new HashMap<>();
  Map<String,Instance> insts=new HashMap<>();
  Map<String,Query> queries=new HashMap<>();
  Map<String,FullQuery> full_queries=new HashMap<>();
  for (  String k : prog.sigs.keySet()) {
    try {
      SigExp v=prog.sigs.get(k);
      v.typeOf(prog);
      sigs.put(k,v.toSig(prog));
      toUpdate[0]="String_Node_Str" + k;
    }
 catch (    RuntimeException re) {
      re.printStackTrace();
      LineException exn=new LineException(re.getLocalizedMessage(),k,"String_Node_Str");
      if (NEWDEBUG.debug.fql.continue_on_error) {
        exns.add(exn);
      }
 else {
        throw exn;
      }
    }
  }
  for (  String k : prog.maps.keySet()) {
    try {
      MapExp v=prog.maps.get(k);
      v.type(prog);
      maps.put(k,v.toMap(prog));
      toUpdate[0]="String_Node_Str" + k;
    }
 catch (    RuntimeException re) {
      re.printStackTrace();
      LineException exn=new LineException(re.getLocalizedMessage(),k,"String_Node_Str");
      if (NEWDEBUG.debug.fql.continue_on_error) {
        exns.add(exn);
      }
 else {
        throw exn;
      }
    }
  }
  for (  String k : prog.queries.keySet()) {
    try {
      QueryExp v=prog.queries.get(k);
      v.type(prog);
      queries.put(k,Query.toQuery(prog,v));
      toUpdate[0]="String_Node_Str" + k;
    }
 catch (    RuntimeException re) {
      re.printStackTrace();
      LineException exn=new LineException(re.getLocalizedMessage(),k,"String_Node_Str");
      if (NEWDEBUG.debug.fql.continue_on_error) {
        exns.add(exn);
      }
 else {
        throw exn;
      }
    }
  }
  for (  String k : prog.full_queries.keySet()) {
    try {
      FullQueryExp v=prog.full_queries.get(k);
      v.type(prog);
      full_queries.put(k,FullQuery.toQuery(prog,v));
      toUpdate[0]="String_Node_Str" + k;
    }
 catch (    RuntimeException re) {
      re.printStackTrace();
      LineException exn=new LineException(re.getLocalizedMessage(),k,"String_Node_Str");
      if (NEWDEBUG.debug.fql.continue_on_error) {
        exns.add(exn);
      }
 else {
        throw exn;
      }
    }
  }
  for (  String k : prog.insts.keySet()) {
    try {
      InstExp v=prog.insts.get(k);
      v.type(prog);
      toUpdate[0]="String_Node_Str" + v + "String_Node_Str";
    }
 catch (    RuntimeException re) {
      re.printStackTrace();
      LineException exn=new LineException(re.getLocalizedMessage(),k,"String_Node_Str");
      if (NEWDEBUG.debug.fql.continue_on_error) {
        exns.add(exn);
      }
 else {
        throw exn;
      }
    }
  }
  for (  String k : prog.transforms.keySet()) {
    try {
      TransExp v=prog.transforms.get(k);
      v.type(prog);
      toUpdate[0]="String_Node_Str" + v + "String_Node_Str";
    }
 catch (    RuntimeException re) {
      re.printStackTrace();
      LineException exn=new LineException(re.getLocalizedMessage(),k,"String_Node_Str");
      if (NEWDEBUG.debug.fql.continue_on_error) {
        exns.add(exn);
      }
 else {
        throw exn;
      }
    }
  }
  prog=rewriteQueries(prog);
  toUpdate[0]="String_Node_Str";
  Triple<Map<String,Set<Map<Object,Object>>>,String,List<Throwable>> res=JDBCBridge.run(prog);
  toUpdate[0]="String_Node_Str";
  exns.addAll(res.third);
  for (  String k : prog.insts.keySet()) {
    try {
      Signature s=prog.insts.get(k).type(prog).toSig(prog);
      List<Pair<String,List<Pair<Object,Object>>>> b=PSMGen.gather(k,s,res.first);
      insts.put(k,new Instance(s,b));
      toUpdate[0]="String_Node_Str" + k;
    }
 catch (    Exception re) {
      re.printStackTrace();
      LineException exn=new LineException(re.getLocalizedMessage(),k,"String_Node_Str");
      if (NEWDEBUG.debug.fql.continue_on_error) {
        exns.add(exn);
      }
 else {
        throw exn;
      }
    }
  }
  Map<String,Transform> transforms=new HashMap<>();
  for (  String k : prog.transforms.keySet()) {
    try {
      Pair<String,String> val=prog.transforms.get(k).type(prog);
      InstExp i=prog.insts.get(val.first);
      Signature s=i.type(prog).toSig(prog);
      List<Pair<String,List<Pair<Object,Object>>>> b=PSMGen.gather(k,s,res.first);
      transforms.put(k,new Transform(insts.get(val.first),insts.get(val.second),b));
      toUpdate[0]="String_Node_Str" + k;
    }
 catch (    Exception re) {
      re.printStackTrace();
      LineException exn=new LineException(re.getLocalizedMessage(),k,"String_Node_Str");
      if (NEWDEBUG.debug.fql.continue_on_error) {
        exns.add(exn);
      }
 else {
        throw exn;
      }
    }
  }
  toUpdate[0]="String_Node_Str";
  if (NEWDEBUG.debug.fql.VALIDATE_WITH_EDS) {
    try {
      validateWithEds(prog,insts);
    }
 catch (    FQLException fe) {
      fe.printStackTrace();
      throw new RuntimeException(fe.getLocalizedMessage());
    }
  }
  String toRetStr=res.second.trim();
  if (containsFullSigma(prog)) {
    toRetStr="String_Node_Str";
  }
  return new Triple<>(new FqlEnvironment(sigs,maps,insts,queries,transforms,full_queries),toRetStr,dedup(exns));
}