Program: 39961
Project: 39961
Buggy source:
/** 
 * End to end execution of experiment for a single query.
 * @param query              query to execute
 * @param connectionDataProd data of db connection for production database
 * @param connectionDataTest data of db connection for test database
 */
public static QueryExperimentResult runForQuery(String query,ConnectionData connectionDataProd,ConnectionData connectionDataTest,String packageName){
  Path experimentPath=Paths.get(System.getProperty("String_Node_Str"),"String_Node_Str",packageName);
  try {
    Files.createDirectories(experimentPath);
  }
 catch (  IOException e) {
    System.err.println(e);
  }
  URL gradlePath=Runner.class.getResource("String_Node_Str");
  try {
    Files.copy(Paths.get(gradlePath.toURI().toString()),Paths.get(experimentPath.toUri().toString(),"String_Node_Str"));
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
catch (  URISyntaxException e) {
    e.printStackTrace();
  }
  Path testClassPath=Paths.get(experimentPath.toAbsolutePath().toString(),"String_Node_Str","String_Node_Str","String_Node_Str",packageName);
  if (!Files.exists(testClassPath)) {
    try {
      Files.createDirectories(testClassPath);
    }
 catch (    IOException e) {
      System.err.println(e);
    }
  }
  BrewExecutor brewExecutor=new BrewExecutor(connectionDataProd,connectionDataTest,query,packageName);
  brewExecutor.executeBrew(testClassPath,"String_Node_Str");
  QueryMutator queryMutator=new QueryMutator(query,connectionDataProd.getDatabase());
  List<String> queryMutants=queryMutator.createMutants();
  for (int i=0; i < queryMutants.size(); i++) {
    brewExecutor.brewWithMutatedQuery(brewExecutor.getQueryResult(),testClassPath,"String_Node_Str" + i);
  }
  try {
    Process proc;
    ProcessBuilder pb=new ProcessBuilder("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
    pb.directory(experimentPath.toFile());
    proc=pb.start();
    proc.waitFor();
    final int exitCode=proc.exitValue();
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
catch (  InterruptedException e) {
    e.printStackTrace();
  }
  return null;
}

Fixed version (ground truth):
/** 
 * End to end execution of experiment for a single query.
 * @param query              query to execute
 * @param connectionDataProd data of db connection for production database
 * @param connectionDataTest data of db connection for test database
 */
public static QueryExperimentResult runForQuery(String query,ConnectionData connectionDataProd,ConnectionData connectionDataTest,String packageName){
  Path experimentPath=Paths.get(System.getProperty("String_Node_Str"),"String_Node_Str",packageName);
  try {
    Files.createDirectories(experimentPath);
  }
 catch (  IOException e) {
    System.err.println(e);
  }
  URL gradlePathURL=Runner.class.getClassLoader().getResource("String_Node_Str");
  Path gradlePath=null;
  try {
    gradlePath=Paths.get(gradlePathURL.toURI());
  }
 catch (  URISyntaxException e) {
    e.printStackTrace();
  }
  try {
    Files.copy(Paths.get(gradlePath.toString()),Paths.get(experimentPath.toString(),"String_Node_Str"));
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
  Path testClassPath=Paths.get(experimentPath.toAbsolutePath().toString(),"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str" + packageName);
  if (!Files.exists(testClassPath)) {
    try {
      Files.createDirectories(testClassPath);
    }
 catch (    IOException e) {
      System.err.println(e);
    }
  }
  BrewExecutor brewExecutor=new BrewExecutor(connectionDataProd,connectionDataTest,query,"String_Node_Str" + packageName);
  brewExecutor.executeBrew(testClassPath,"String_Node_Str");
  QueryMutator queryMutator=new QueryMutator(query,connectionDataProd.getDatabase());
  List<String> queryMutants=queryMutator.createMutants();
  for (int i=0; i < queryMutants.size(); i++) {
    brewExecutor.brewWithMutatedQuery(brewExecutor.getQueryResult(),testClassPath,"String_Node_Str" + i);
  }
  try {
    Process proc;
    ProcessBuilder pb=new ProcessBuilder("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
    pb.directory(experimentPath.toFile());
    proc=pb.start();
    proc.waitFor();
    final int exitCode=proc.exitValue();
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
catch (  InterruptedException e) {
    e.printStackTrace();
  }
  return null;
}