Program: 77080
Project: 77080
Buggy source:
/** 
 * Parses the old resultSets and resultSetHints list to the new resultSets list. <p> resultSetsHints maps to new result set name. resultSet maps to new result set native name. <p> The conversion is done from the file version 3.2.5. It is a part of automatic conversion for BIRT 2.1.1.
 * @param resultSets the result sets
 * @param resultSetHints the result set hints
 */
private void mergeResultSetAndResultSetHints(OdaDataSet dataSet){
  if (handler.versionNumber >= VersionUtil.VERSION_3_2_6 || handler.versionNumber < VersionUtil.VERSION_3_2_2) {
    return;
  }
  List resultSets=(List)dataSet.getLocalProperty(handler.module,IDataSetModel.RESULT_SET_PROP);
  List resultSetHints=(List)dataSet.getLocalProperty(handler.module,IDataSetModel.RESULT_SET_HINTS_PROP);
  if (resultSetHints == null) {
    updateOdaResultSetColumn(resultSets);
    return;
  }
  for (int i=0; i < resultSetHints.size(); i++) {
    ResultSetColumn hint=(ResultSetColumn)resultSetHints.get(i);
    OdaResultSetColumn currentColumn=findResultSet(resultSets,hint.getColumnName(),hint.getPosition());
    if (currentColumn == null) {
      currentColumn=convertResultSetColumnToOdaResultSetColumn(hint);
      resultSets.add(currentColumn);
    }
 else {
      String nativeName=currentColumn.getColumnName();
      String columnName=hint.getColumnName();
      currentColumn.setColumnName(columnName);
      currentColumn.setNativeName(nativeName);
      if (currentColumn.getDataType() == null)       currentColumn.setDataType(hint.getDataType());
      if (currentColumn.getNativeDataType() == null)       currentColumn.setNativeDataType(hint.getNativeDataType());
      if (currentColumn.getNativeName() == null)       currentColumn.setNativeName(currentColumn.getColumnName());
      if (currentColumn.getColumnName() == null)       currentColumn.setColumnName(currentColumn.getNativeName());
    }
  }
}

Fixed version (ground truth):
/** 
 * Parses the old resultSets and resultSetHints list to the new resultSets list. <p> resultSetsHints maps to new result set name. resultSet maps to new result set native name. <p> The conversion is done from the file version 3.2.5. It is a part of automatic conversion for BIRT 2.1.1.
 * @param resultSets the result sets
 * @param resultSetHints the result set hints
 */
private void mergeResultSetAndResultSetHints(OdaDataSet dataSet){
  if (handler.versionNumber >= VersionUtil.VERSION_3_2_6 || handler.versionNumber < VersionUtil.VERSION_3_2_2) {
    return;
  }
  List resultSets=(List)dataSet.getLocalProperty(handler.module,IDataSetModel.RESULT_SET_PROP);
  List resultSetHints=(List)dataSet.getLocalProperty(handler.module,IDataSetModel.RESULT_SET_HINTS_PROP);
  if (resultSetHints == null) {
    updateOdaResultSetColumn(resultSets);
    return;
  }
  for (int i=0; i < resultSetHints.size(); i++) {
    ResultSetColumn hint=(ResultSetColumn)resultSetHints.get(i);
    OdaResultSetColumn currentColumn=null;
    if (resultSets != null)     currentColumn=findResultSet(resultSets,hint.getColumnName(),hint.getPosition());
    if (currentColumn == null) {
      currentColumn=convertResultSetColumnToOdaResultSetColumn(hint);
      if (resultSets == null) {
        resultSets=new ArrayList();
        dataSet.setProperty(IDataSetModel.RESULT_SET_PROP,resultSets);
      }
      resultSets.add(currentColumn);
    }
 else {
      String nativeName=currentColumn.getColumnName();
      String columnName=hint.getColumnName();
      currentColumn.setColumnName(columnName);
      currentColumn.setNativeName(nativeName);
      if (currentColumn.getDataType() == null)       currentColumn.setDataType(hint.getDataType());
      if (currentColumn.getNativeDataType() == null)       currentColumn.setNativeDataType(hint.getNativeDataType());
      if (currentColumn.getNativeName() == null)       currentColumn.setNativeName(currentColumn.getColumnName());
      if (currentColumn.getColumnName() == null)       currentColumn.setColumnName(currentColumn.getNativeName());
    }
  }
}