Program: 127524
Project: 127524
Buggy source:
/** 
 * addButtonControls.
 * @param cancelButton
 */
@Override protected void addUtilsButtonListeners(){
  previewButton.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    final SelectionEvent e){
      if (!previewButton.getText().equals(Messages.getString("String_Node_Str"))) {
        previewButton.setText(Messages.getString("String_Node_Str"));
        if (getConnection().getSchemas() != null && !getConnection().getSchemas().isEmpty() && ((Concept)getConnection().getSchemas().get(0)).getLoopExpression() != null && !("String_Node_Str").equals(((Concept)getConnection().getSchemas().get(0)).getLoopExpression()) && ((Concept)getConnection().getSchemas().get(0)).getConceptTargets() != null && !((Concept)getConnection().getSchemas().get(0)).getConceptTargets().isEmpty()) {
          refreshPreview();
        }
 else {
          previewButton.setText(Messages.getString("String_Node_Str"));
          if (!previewButton.getEnabled()) {
            Display.getDefault().asyncExec(new Runnable(){
              public void run(){
                handleErrorOutput(outputComposite,tabFolder,outputTabItem);
              }
            }
);
            log.error(Messages.getString("String_Node_Str"));
            previewButton.setEnabled(true);
          }
 else {
            previewButton.setEnabled(false);
          }
        }
      }
 else {
        previewButton.setText(Messages.getString("String_Node_Str"));
      }
    }
  }
);
  if (cancelButton != null) {
    cancelButton.addSelectionListener(new SelectionAdapter(){
      @Override public void widgetSelected(      final SelectionEvent e){
        getShell().close();
      }
    }
);
  }
}

Fixed version (ground truth):
/** 
 * addButtonControls.
 * @param cancelButton
 */
@Override protected void addUtilsButtonListeners(){
  previewButton.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    final SelectionEvent e){
      if (!previewButton.getText().equals(Messages.getString("String_Node_Str"))) {
        previewButton.setText(Messages.getString("String_Node_Str"));
        if (getConnection().getSchemas() != null && !getConnection().getSchemas().isEmpty() && getConnection().getSchemas().get(0).getLoopExpression() != null && !("String_Node_Str").equals(getConnection().getSchemas().get(0).getLoopExpression()) && getConnection().getSchemas().get(0).getConceptTargets() != null && !getConnection().getSchemas().get(0).getConceptTargets().isEmpty()) {
          refreshPreview();
        }
 else {
          previewButton.setText(Messages.getString("String_Node_Str"));
          if (!previewButton.getEnabled()) {
            Display.getDefault().asyncExec(new Runnable(){
              @Override public void run(){
                handleErrorOutput(outputComposite,tabFolder,outputTabItem);
              }
            }
);
            log.error(Messages.getString("String_Node_Str"));
            previewButton.setEnabled(true);
          }
 else {
            previewButton.setEnabled(false);
          }
        }
      }
 else {
        previewButton.setText(Messages.getString("String_Node_Str"));
      }
    }
  }
);
  if (cancelButton != null) {
    cancelButton.addSelectionListener(new SelectionAdapter(){
      @Override public void widgetSelected(      final SelectionEvent e){
        getShell().close();
      }
    }
);
  }
}