Program: 65634
Project: 65634
Buggy source:
@SuppressWarnings("String_Node_Str") public IPreparedDSQuery prepare() throws DataException {
  if (odaStatement != null)   throw new DataException(ResourceConstants.QUERY_HAS_PREPARED);
  populateQuerySpecification();
  odaStatement=dataSource.prepareStatement(queryText,queryType,this.querySpecificaton);
  addPropertiesToPreparedStatement();
  addParameterDefns();
  IOdaDataSetDesign design=null;
  if (session.getDataSetCacheManager().getCurrentDataSetDesign() instanceof IOdaDataSetDesign)   design=(IOdaDataSetDesign)session.getDataSetCacheManager().getCurrentDataSetDesign();
  if (design != null) {
    if (canAccessResultSetByName(design)) {
      addCustomFields(design.getPrimaryResultSetName(),odaStatement);
      addColumnHints(design.getPrimaryResultSetName(),odaStatement);
      if (this.projectedFields != null)       odaStatement.setColumnsProjection(design.getPrimaryResultSetName(),this.projectedFields);
    }
 else     if (canAccessResultSetByNumber(design)) {
      addCustomFields(design.getPrimaryResultSetNumber(),odaStatement);
      addColumnHints(design.getPrimaryResultSetNumber(),odaStatement);
      if (this.projectedFields != null)       odaStatement.setColumnsProjection(design.getPrimaryResultSetNumber(),this.projectedFields);
    }
 else {
      prepareColumns();
    }
  }
 else {
    prepareColumns();
  }
  odaStatement.setMaxRows(this.getRowFetchLimit());
  try {
    ICancellable queryCanceller=new OdaQueryCanceller(odaStatement,session.getStopSign());
    this.session.getCancelManager().register(queryCanceller);
    if (!session.getStopSign().isStopped())     resultMetadata=getMetaData((IOdaDataSetDesign)session.getDataSetCacheManager().getCurrentDataSetDesign(),odaStatement);
    if (queryCanceller.collectException() != null) {
      if (!(queryCanceller.collectException().getCause() instanceof UnsupportedOperationException))       throw queryCanceller.collectException();
    }
    this.session.getCancelManager().deregister(queryCanceller);
  }
 catch (  DataException e) {
    resultMetadata=null;
  }
  return this;
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public IPreparedDSQuery prepare() throws DataException {
  if (odaStatement != null)   throw new DataException(ResourceConstants.QUERY_HAS_PREPARED);
  populateQuerySpecification();
  odaStatement=dataSource.prepareStatement(queryText,queryType,this.querySpecificaton);
  addPropertiesToPreparedStatement();
  addParameterDefns();
  IOdaDataSetDesign design=null;
  if (session.getDataSetCacheManager().getCurrentDataSetDesign() instanceof IOdaDataSetDesign)   design=(IOdaDataSetDesign)session.getDataSetCacheManager().getCurrentDataSetDesign();
  if (design != null) {
    if (canAccessResultSetByName(design)) {
      addCustomFields(design.getPrimaryResultSetName(),odaStatement);
      addColumnHints(design.getPrimaryResultSetName(),odaStatement);
      if (this.projectedFields != null)       odaStatement.setColumnsProjection(design.getPrimaryResultSetName(),this.projectedFields);
    }
 else     if (canAccessResultSetByNumber(design)) {
      addCustomFields(design.getPrimaryResultSetNumber(),odaStatement);
      addColumnHints(design.getPrimaryResultSetNumber(),odaStatement);
      if (this.projectedFields != null)       odaStatement.setColumnsProjection(design.getPrimaryResultSetNumber(),this.projectedFields);
    }
 else {
      prepareColumns();
    }
  }
 else {
    prepareColumns();
  }
  odaStatement.setMaxRows(this.getRowFetchLimit());
  try {
    ICancellable queryCanceller=new OdaQueryCanceller(odaStatement,session.getStopSign());
    this.session.getCancelManager().register(queryCanceller);
    if (!session.getStopSign().isStopped())     resultMetadata=getMetaData((IOdaDataSetDesign)session.getDataSetCacheManager().getCurrentDataSetDesign(),odaStatement);
    if (design != null) {
      List modelResultHints=design.getResultSetHints();
      resultMetadata=mergeResultHint(modelResultHints,resultMetadata);
    }
    if (queryCanceller.collectException() != null) {
      if (!(queryCanceller.collectException().getCause() instanceof UnsupportedOperationException))       throw queryCanceller.collectException();
    }
    this.session.getCancelManager().deregister(queryCanceller);
  }
 catch (  DataException e) {
    resultMetadata=null;
  }
  return this;
}