Program: 68287
Project: 68287
Buggy source:
/** 
 * @param handle
 */
public void saveResult(DataSetHandle handle){
  PropertyHandle resultSetPropertyHandle=handle.getPropertyHandle(DataSetHandle.RESULT_SET_HINTS_PROP);
  PropertyHandle columnHintPropertyHandle=handle.getPropertyHandle(DataSetHandle.COLUMN_HINTS_PROP);
  try {
    resultSetPropertyHandle.setStringValue(null);
    ArrayList removeList=new ArrayList();
    for (Iterator iter=columnHintPropertyHandle.iterator(); iter.hasNext(); ) {
      ColumnHintHandle columnHintHandle=(ColumnHintHandle)iter.next();
      if (!isDuplicatedName(null,columnHintHandle.getColumnName())) {
        removeList.add(columnHintHandle);
      }
    }
    columnHintPropertyHandle.removeItems(removeList);
    Iterator iter=columnList.iterator();
    for (int i=0; iter.hasNext(); i++) {
      ResultSetColumnModel model=(ResultSetColumnModel)iter.next();
      ResultSetColumn column=StructureFactory.createResultSetColumn();
      column.setColumnName(model.columnName);
      column.setDataType(dataTypes[model.dataType].getName());
      column.setPosition(new Integer(i));
      resultSetPropertyHandle.addItem(column);
      ColumnHintHandle columnHintHandle=null;
      for (Iterator hintIter=columnHintPropertyHandle.iterator(); hintIter.hasNext(); ) {
        columnHintHandle=(ColumnHintHandle)hintIter.next();
        if (columnHintHandle.getColumnName().equals(model.columnName)) {
          break;
        }
        columnHintHandle=null;
      }
      if (columnHintHandle == null) {
        ColumnHint columnHint=StructureFactory.createColumnHint();
        columnHint.setProperty(ColumnHint.COLUMN_NAME_MEMBER,model.columnName);
        columnHintHandle=(ColumnHintHandle)columnHintPropertyHandle.addItem(columnHint);
      }
      columnHintHandle.setAnalysis(model.analysis);
      columnHintHandle.setAlias(model.alias);
      columnHintHandle.setDisplayName(model.displayName);
      columnHintHandle.setHelpText(model.helpText);
    }
  }
 catch (  SemanticException e) {
    ExceptionHandler.handle(e);
  }
}

Fixed version (ground truth):
/** 
 * @param handle
 */
public void saveResult(DataSetHandle handle){
  PropertyHandle resultSetPropertyHandle=handle.getPropertyHandle(DataSetHandle.RESULT_SET_HINTS_PROP);
  PropertyHandle columnHintPropertyHandle=handle.getPropertyHandle(DataSetHandle.COLUMN_HINTS_PROP);
  try {
    resultSetPropertyHandle.setStringValue(null);
    ArrayList removeList=new ArrayList();
    for (Iterator iter=columnHintPropertyHandle.iterator(); iter.hasNext(); ) {
      ColumnHintHandle columnHintHandle=(ColumnHintHandle)iter.next();
      if (!isDuplicatedName(null,columnHintHandle.getColumnName())) {
        removeList.add(columnHintHandle);
      }
    }
    columnHintPropertyHandle.removeItems(removeList);
    Iterator iter=columnList.iterator();
    for (int i=0; iter.hasNext(); i++) {
      ResultSetColumnModel model=(ResultSetColumnModel)iter.next();
      ResultSetColumn column=StructureFactory.createResultSetColumn();
      column.setColumnName(model.columnName);
      column.setDataType(dataTypes[model.dataType].getName());
      column.setPosition(new Integer(i));
      resultSetPropertyHandle.addItem(column);
      ColumnHintHandle columnHintHandle=null;
      for (Iterator hintIter=columnHintPropertyHandle.iterator(); hintIter.hasNext(); ) {
        columnHintHandle=(ColumnHintHandle)hintIter.next();
        if (columnHintHandle.getColumnName().equals(model.columnName)) {
          break;
        }
        columnHintHandle=null;
      }
      if (columnHintHandle == null) {
        ColumnHint columnHint=StructureFactory.createColumnHint();
        columnHint.setProperty(ColumnHint.COLUMN_NAME_MEMBER,model.columnName);
        columnHintHandle=(ColumnHintHandle)columnHintPropertyHandle.addItem(columnHint);
      }
      updateColumnHintProperties(model,columnHintHandle);
    }
  }
 catch (  SemanticException e) {
    ExceptionHandler.handle(e);
  }
}