Program: 150491
Project: 150491
Buggy source:
private void evaluate_unrestricted_nothread(final String sql,final int maxDisplayedRowCount){
  closeLastExecution();
  SwingUtilities.invokeLater(new Runnable(){
    @Override public void run(){
      startButton.setVisible(false);
      stopButton.setVisible(true);
      stopButton.setToolTipText("String_Node_Str" + Utils.formatDateTimeTZ(new Date()));
    }
  }
);
  QueryExecutor queryExecutor;
synchronized (STATEMENT_EXECUTOR_CREATOR_LOCK) {
    queryExecutor=queryExecutorCreator.createQueryExecutor();
    lastStatementExecutor=queryExecutor;
  }
  QueryExecution queryExecution;
  try {
    queryExecution=queryExecutor.execute(sql,isUsingMaxRowCount ? MAX_ROW_COUNT : Integer.MAX_VALUE,maxDisplayedRowCount);
  }
  finally {
    SwingUtilities.invokeLater(new Runnable(){
      @Override public void run(){
        startButton.setVisible(true);
        stopButton.setVisible(false);
        stopButton.setToolTipText(null);
      }
    }
);
  }
  final QueryExecutionResult[] results=queryExecution.getResults();
  final long executionDuration=queryExecution.getExecutionDuration();
  SwingUtilities.invokeLater(new Runnable(){
    @Override public void run(){
      for (      QueryExecutionResult result : results) {
        if (result instanceof QueryExecutionMessageResult) {
          QueryExecutionMessageResult messageResult=(QueryExecutionMessageResult)result;
          setMessage(addResultPane(),messageResult.getMessage(),messageResult.isError());
        }
 else         if (result instanceof StatementExecutionResultSetResult) {
          addResultTable(sql,executionDuration,(StatementExecutionResultSetResult)result);
        }
 else {
          throw new IllegalStateException("String_Node_Str" + result.getClass().getName());
        }
      }
    }
  }
);
}

Fixed version (ground truth):
private void evaluate_unrestricted_nothread(final String sql,final int maxDisplayedRowCount,boolean isUpdatable){
  closeLastExecution();
  SwingUtilities.invokeLater(new Runnable(){
    @Override public void run(){
      startButton.setVisible(false);
      stopButton.setVisible(true);
      stopButton.setToolTipText("String_Node_Str" + Utils.formatDateTimeTZ(new Date()));
    }
  }
);
  QueryExecutor queryExecutor;
synchronized (STATEMENT_EXECUTOR_CREATOR_LOCK) {
    queryExecutor=queryExecutorCreator.createQueryExecutor();
    lastStatementExecutor=queryExecutor;
  }
  QueryExecution queryExecution;
  try {
    queryExecution=queryExecutor.execute(sql,isUsingMaxRowCount ? MAX_ROW_COUNT : Integer.MAX_VALUE,maxDisplayedRowCount,isUpdatable);
  }
  finally {
    SwingUtilities.invokeLater(new Runnable(){
      @Override public void run(){
        startButton.setVisible(true);
        stopButton.setVisible(false);
        stopButton.setToolTipText(null);
      }
    }
);
  }
  final QueryExecutionResult[] results=queryExecution.getResults();
  final long executionDuration=queryExecution.getExecutionDuration();
  SwingUtilities.invokeLater(new Runnable(){
    @Override public void run(){
      for (      QueryExecutionResult result : results) {
        if (result instanceof QueryExecutionMessageResult) {
          QueryExecutionMessageResult messageResult=(QueryExecutionMessageResult)result;
          setMessage(addResultPane(),messageResult.getMessage(),messageResult.isError());
        }
 else         if (result instanceof StatementExecutionResultSetResult) {
          addResultTable(sql,executionDuration,(StatementExecutionResultSetResult)result);
        }
 else {
          throw new IllegalStateException("String_Node_Str" + result.getClass().getName());
        }
      }
    }
  }
);
}