Program: 95351
Project: 95351
Buggy source:
/** 
 * @param oldParamsMap the old parameters for comparison
 * @param params the maybe changed parmaters
 * @param paramsToRename the map which parameter should be renamed
 * @param paramsToChangeUsage the map which parameter should the usage be updated
 * @param paramsToUpdate the map which parameter should the value set be updated
 */
private static void fillMapsWithChanges(Map<String,IParamDescriptionPO> oldParamsMap,List<Parameter> params,Map<IParamDescriptionPO,String> paramsToRename,Map<IParamDescriptionPO,String> paramsToChangeUsage,Map<IParamDescriptionPO,Parameter> paramsToUpdate){
  for (  Parameter param : params) {
    IParamDescriptionPO paramDescr=oldParamsMap.get(param.getGuid());
    if (paramDescr != null) {
      if (!(paramDescr.getName().equals(param.getName()))) {
        Parameter paramNotRenamed=getNotRenamedParamWithSameName(oldParamsMap,params,param);
        if (paramNotRenamed == null) {
          paramsToRename.put(paramDescr,param.getName());
        }
 else {
          paramsToChangeUsage.put(paramDescr,paramNotRenamed.getGuid());
        }
      }
      if (paramDescr instanceof ITcParamDescriptionPO) {
        ITcParamDescriptionPO tcdesc=(ITcParamDescriptionPO)paramDescr;
        IParamValueSetPO valueSet=tcdesc.getValueSet();
        List<IValueCommentPO> values=valueSet.getValues();
        List<ValueComment> paramValues=param.getValueSet();
        String paramDefault=param.getDefaultValue();
        String valueSetDefault=valueSet.getDefaultValue();
        if (!StringUtils.equals(valueSetDefault,paramDefault)) {
          paramsToUpdate.put(tcdesc,param);
        }
 else         if (values.size() != paramValues.size()) {
          paramsToUpdate.put(tcdesc,param);
        }
 else {
          for (          ValueComment vcParam : paramValues) {
            boolean found=false;
            for (            IValueCommentPO vc : values) {
              if (StringUtils.equals(vcParam.getValue(),(vc.getValue()))) {
                found=true;
                if (StringUtils.equals(vcParam.getComment(),vc.getComment())) {
                  paramsToUpdate.put(tcdesc,param);
                }
              }
            }
            if (!found) {
              paramsToUpdate.put(tcdesc,param);
            }
          }
        }
      }
    }
 else {
      Assert.notReached(Messages.UnexpectedError + StringConstants.COLON + StringConstants.SPACE+ Messages.ModificationOfNonExistingParameter+ StringConstants.DOT);
    }
  }
}

Fixed version (ground truth):
/** 
 * @param oldParamsMap the old parameters for comparison
 * @param params the maybe changed parmaters
 * @param paramsToRename the map which parameter should be renamed
 * @param paramsToChangeUsage the map which parameter should the usage be updated
 * @param paramsToUpdate the map which parameter should the value set be updated
 */
private static void fillMapsWithChanges(Map<String,IParamDescriptionPO> oldParamsMap,List<Parameter> params,Map<IParamDescriptionPO,String> paramsToRename,Map<IParamDescriptionPO,String> paramsToChangeUsage,Map<IParamDescriptionPO,Parameter> paramsToUpdate){
  for (  Parameter param : params) {
    IParamDescriptionPO paramDescr=oldParamsMap.get(param.getGuid());
    if (paramDescr != null) {
      if (!(paramDescr.getName().equals(param.getName()))) {
        Parameter paramNotRenamed=getNotRenamedParamWithSameName(oldParamsMap,params,param);
        if (paramNotRenamed == null) {
          paramsToRename.put(paramDescr,param.getName());
        }
 else {
          paramsToChangeUsage.put(paramDescr,paramNotRenamed.getGuid());
        }
      }
      if (paramDescr instanceof ITcParamDescriptionPO) {
        ITcParamDescriptionPO tcdesc=(ITcParamDescriptionPO)paramDescr;
        IParamValueSetPO valueSet=tcdesc.getValueSet();
        List<IValueCommentPO> values=valueSet.getValues();
        List<ValueComment> paramValues=param.getValueSet();
        String paramDefault=param.getDefaultValue();
        String valueSetDefault=valueSet.getDefaultValue();
        if (!StringUtils.equals(valueSetDefault,paramDefault)) {
          paramsToUpdate.put(tcdesc,param);
        }
 else         if (values.size() != paramValues.size()) {
          paramsToUpdate.put(tcdesc,param);
        }
 else {
          for (          ValueComment vcParam : paramValues) {
            boolean found=false;
            for (            IValueCommentPO vc : values) {
              if (StringUtils.equals(vcParam.getValue(),(vc.getValue()))) {
                found=true;
                if (!StringUtils.equals(vcParam.getComment(),vc.getComment())) {
                  paramsToUpdate.put(tcdesc,param);
                }
              }
            }
            if (!found) {
              paramsToUpdate.put(tcdesc,param);
            }
          }
        }
      }
    }
 else {
      Assert.notReached(Messages.UnexpectedError + StringConstants.COLON + StringConstants.SPACE+ Messages.ModificationOfNonExistingParameter+ StringConstants.DOT);
    }
  }
}