Program: 60734
Project: 60734
Buggy source:
private Job doExecute() throws ExecutionFailureException {
  final String userQuery=QUERY_SPLITTER.splitToList(getJob().getQuery()).get(0);
  final PersistentJobOutput output=job.getOutput();
  final String query=output.processQuery(userQuery);
  final Persistor persistor=output.getPersistor(job);
  if (!persistor.canPersist(authorizer)) {
    throw new ExecutionFailureException(job,"String_Node_Str",null);
  }
  final Stopwatch stopwatch=Stopwatch.createStarted();
  final List<List<Object>> outputPreview=new ArrayList<>(maxRowsPreviewOutput);
  Set<Table> tables=Collections.emptySet();
  try {
    tables=authorizer.tablesUsedByQuery(query);
  }
 catch (  ParsingException e) {
    job.setError(new QueryError(e.getMessage(),null,-1,new ErrorLocation(e.getLineNumber(),e.getColumnNumber()),null));
    cancelAndThrow(null,stopwatch,new ExecutionFailureException(job,"String_Node_Str",e));
  }
  if (!authorizer.isAuthorizedRead(tables)) {
    cancelAndThrow(null,stopwatch,new ExecutionFailureException(job,"String_Node_Str",null));
  }
  try (StatementClient client=queryRunner.startInternalQuery(query)){
    while (client.isValid() && !Thread.currentThread().isInterrupted()) {
      QueryResults results=client.current();
      List<Column> resultColumns=null;
      JobState jobState=null;
      QueryError queryError=null;
      QueryStats queryStats=null;
      if (stopwatch.elapsed(TimeUnit.MILLISECONDS) > timeout.getMillis()) {
        cancelAndThrow(client,stopwatch,new ExecutionFailureException(job,format("String_Node_Str",timeout.toString()),null));
      }
      if (results.getError() != null) {
        queryError=results.getError();
        jobState=JobState.FAILED;
      }
      if ((results.getInfoUri() != null) && (jobState != JobState.FAILED)) {
        BasicQueryInfo queryInfo=queryInfoClient.from(results.getInfoUri());
        if (queryInfo != null) {
          queryStats=queryInfo.getQueryStats();
        }
      }
      if (results.getStats() != null) {
        jobState=JobState.fromStatementState(results.getStats().getState());
      }
      if (results.getColumns() != null) {
        resultColumns=results.getColumns();
        persistor.onColumns(resultColumns);
      }
      if (results.getData() != null) {
        List<List<Object>> resultsData=ImmutableList.copyOf(results.getData());
        persistor.onData(resultsData);
      }
      rlUpdateJobInfo(tables,resultColumns,queryStats,jobState,queryError,outputPreview);
      client.advance();
    }
    QueryResults finalResults=client.finalResults();
    if (finalResults != null && finalResults.getInfoUri() != null) {
      BasicQueryInfo queryInfo=queryInfoClient.from(finalResults.getInfoUri());
      if (queryInfo != null) {
        updateJobInfo(null,null,queryInfo.getQueryStats(),JobState.fromStatementState(finalResults.getStats().getState()),finalResults.getError(),outputPreview,true);
      }
    }
  }
   stopwatch.stop();
  if (job.getState() != JobState.FAILED) {
    persistor.persist();
  }
 else {
    throw new ExecutionFailureException(job,null,null);
  }
  System.out.println("String_Node_Str");
  return getJob();
}

Fixed version (ground truth):
private Job doExecute() throws ExecutionFailureException {
  final String userQuery=QUERY_SPLITTER.splitToList(getJob().getQuery()).get(0);
  final PersistentJobOutput output=job.getOutput();
  final String query=output.processQuery(userQuery);
  final Persistor persistor=output.getPersistor(job);
  if (!persistor.canPersist(authorizer)) {
    throw new ExecutionFailureException(job,"String_Node_Str",null);
  }
  final Stopwatch stopwatch=Stopwatch.createStarted();
  final List<List<Object>> outputPreview=new ArrayList<>(maxRowsPreviewOutput);
  Set<Table> tables=Collections.emptySet();
  try {
    tables=authorizer.tablesUsedByQuery(query);
  }
 catch (  ParsingException e) {
    job.setError(new QueryError(e.getMessage(),null,-1,new ErrorLocation(e.getLineNumber(),e.getColumnNumber()),null));
    cancelAndThrow(null,stopwatch,new ExecutionFailureException(job,"String_Node_Str",e));
  }
  if (!authorizer.isAuthorizedRead(tables)) {
    job.setQueryStats(createNoOpQueryStats());
    cancelAndThrow(null,stopwatch,new ExecutionFailureException(job,"String_Node_Str",null));
  }
  try (StatementClient client=queryRunner.startInternalQuery(query)){
    while (client.isValid() && !Thread.currentThread().isInterrupted()) {
      QueryResults results=client.current();
      List<Column> resultColumns=null;
      JobState jobState=null;
      QueryError queryError=null;
      QueryStats queryStats=null;
      if (stopwatch.elapsed(TimeUnit.MILLISECONDS) > timeout.getMillis()) {
        cancelAndThrow(client,stopwatch,new ExecutionFailureException(job,format("String_Node_Str",timeout.toString()),null));
      }
      if (results.getError() != null) {
        queryError=results.getError();
        jobState=JobState.FAILED;
      }
      if ((results.getInfoUri() != null) && (jobState != JobState.FAILED)) {
        BasicQueryInfo queryInfo=queryInfoClient.from(results.getInfoUri());
        if (queryInfo != null) {
          queryStats=queryInfo.getQueryStats();
        }
      }
      if (results.getStats() != null) {
        jobState=JobState.fromStatementState(results.getStats().getState());
      }
      if (results.getColumns() != null) {
        resultColumns=results.getColumns();
        persistor.onColumns(resultColumns);
      }
      if (results.getData() != null) {
        List<List<Object>> resultsData=ImmutableList.copyOf(results.getData());
        persistor.onData(resultsData);
      }
      rlUpdateJobInfo(tables,resultColumns,queryStats,jobState,queryError,outputPreview);
      client.advance();
    }
    QueryResults finalResults=client.finalResults();
    if (finalResults != null && finalResults.getInfoUri() != null) {
      BasicQueryInfo queryInfo=queryInfoClient.from(finalResults.getInfoUri());
      if (queryInfo != null) {
        updateJobInfo(null,null,queryInfo.getQueryStats(),JobState.fromStatementState(finalResults.getStats().getState()),finalResults.getError(),outputPreview,true);
      }
    }
  }
   stopwatch.stop();
  if (job.getState() != JobState.FAILED) {
    persistor.persist();
  }
 else {
    throw new ExecutionFailureException(job,null,null);
  }
  System.out.println("String_Node_Str");
  return getJob();
}