Program: 71606
Project: 71606
Buggy source:
/** 
 * Updates values in InputElementAttributes to the given report parameter.
 * @param dataAttrs the latest input element attributes
 * @param cachedDataAttrs the cached input element attributes
 * @param reportParam the report parameter
 * @param setHandle the ROM data set that has the corresponding data set parameter
 * @throws SemanticException
 */
private void updateInputElementAttrsToReportParam(InputElementAttributes elementAttrs,InputElementAttributes cachedElementAttrs,ScalarParameterHandle reportParam,OdaDataSetHandle setHandle) throws SemanticException {
  if (elementAttrs == null)   return;
  String defaultValue=elementAttrs.getDefaultScalarValue();
  String cachedDefaultValue=cachedElementAttrs == null ? null : cachedElementAttrs.getDefaultScalarValue();
  if (!CompareUtil.isEquals(cachedDefaultValue,defaultValue)) {
    if (!DataSetParameterAdapter.BIRT_JS_EXPR.equals(defaultValue))     reportParam.setDefaultValue(defaultValue);
  }
  Boolean isOptional=Boolean.valueOf(elementAttrs.isOptional());
  Boolean cachedIsOptional=cachedElementAttrs == null ? null : Boolean.valueOf(cachedElementAttrs.isOptional());
  if (!CompareUtil.isEquals(cachedIsOptional,isOptional))   setReportParamIsRequired(reportParam,ALLOW_BLANK_PROP_NAME,isOptional.booleanValue());
  Boolean masksValue=Boolean.valueOf(elementAttrs.isMasksValue());
  Boolean cachedMasksValues=cachedElementAttrs == null ? null : Boolean.valueOf(cachedElementAttrs.isMasksValue());
  if (!CompareUtil.isEquals(cachedMasksValues,masksValue))   reportParam.setConcealValue(masksValue.booleanValue());
  updateROMSelectionList(elementAttrs.getStaticValueChoices(),cachedElementAttrs == null ? null : cachedElementAttrs.getStaticValueChoices(),reportParam);
  updateROMDyanmicList(elementAttrs.getDynamicValueChoices(),cachedElementAttrs == null ? null : cachedElementAttrs.getDynamicValueChoices(),reportParam,setHandle);
  InputElementUIHints uiHints=elementAttrs.getUiHints();
  if (uiHints != null) {
    InputElementUIHints cachedUiHints=cachedElementAttrs == null ? null : cachedElementAttrs.getUiHints();
    InputPromptControlStyle style=uiHints.getPromptStyle();
    InputPromptControlStyle cachedStyle=cachedUiHints == null ? null : cachedUiHints.getPromptStyle();
    if (cachedStyle == null || (style != null && cachedStyle.getValue() != style.getValue()))     reportParam.setControlType(style == null ? null : newROMControlType(style.getValue()));
  }
}

Fixed version (ground truth):
/** 
 * Updates values in InputElementAttributes to the given report parameter.
 * @param dataAttrs the latest input element attributes
 * @param cachedDataAttrs the cached input element attributes
 * @param reportParam the report parameter
 * @param setHandle the ROM data set that has the corresponding data set parameter
 * @throws SemanticException
 */
private void updateInputElementAttrsToReportParam(InputElementAttributes elementAttrs,InputElementAttributes cachedElementAttrs,ScalarParameterHandle reportParam,OdaDataSetHandle setHandle) throws SemanticException {
  if (elementAttrs == null)   return;
  String defaultValue=elementAttrs.getDefaultScalarValue();
  String cachedDefaultValue=cachedElementAttrs == null ? null : cachedElementAttrs.getDefaultScalarValue();
  if (!CompareUtil.isEquals(cachedDefaultValue,defaultValue)) {
    if (!DataSetParameterAdapter.BIRT_JS_EXPR.equals(defaultValue))     reportParam.setDefaultValue(defaultValue);
  }
  Boolean isOptional=Boolean.valueOf(elementAttrs.isOptional());
  Boolean cachedIsOptional=cachedElementAttrs == null ? null : Boolean.valueOf(cachedElementAttrs.isOptional());
  if (!CompareUtil.isEquals(cachedIsOptional,isOptional))   setReportParamIsRequired(reportParam,ALLOW_BLANK_PROP_NAME,isOptional.booleanValue());
  Boolean masksValue=Boolean.valueOf(elementAttrs.isMasksValue());
  Boolean cachedMasksValues=cachedElementAttrs == null ? null : Boolean.valueOf(cachedElementAttrs.isMasksValue());
  if (!CompareUtil.isEquals(cachedMasksValues,masksValue))   reportParam.setConcealValue(masksValue.booleanValue());
  updateROMSelectionList(elementAttrs.getStaticValueChoices(),cachedElementAttrs == null ? null : cachedElementAttrs.getStaticValueChoices(),reportParam);
  DynamicValuesQuery valueQuery=elementAttrs.getDynamicValueChoices();
  updateROMDyanmicList(valueQuery,cachedElementAttrs == null ? null : cachedElementAttrs.getDynamicValueChoices(),reportParam,setHandle);
  if (valueQuery == null)   valueQuery=designFactory.createDynamicValuesQuery();
  DynamicValuesQuery cachedValueQuery=cachedElementAttrs == null ? null : cachedElementAttrs.getDynamicValueChoices();
  boolean isEnabled=valueQuery.isEnabled();
  boolean cachedIsEnabled=cachedValueQuery == null ? false : cachedValueQuery.isEnabled();
  if ((cachedValueQuery == null || cachedIsEnabled != isEnabled) && isEnabled)   reportParam.setValueType(DesignChoiceConstants.PARAM_VALUE_TYPE_DYNAMIC);
 else   if ((cachedValueQuery == null || cachedIsEnabled != isEnabled) && !isEnabled)   reportParam.setValueType(DesignChoiceConstants.PARAM_VALUE_TYPE_STATIC);
  InputElementUIHints uiHints=elementAttrs.getUiHints();
  if (uiHints != null) {
    InputElementUIHints cachedUiHints=cachedElementAttrs == null ? null : cachedElementAttrs.getUiHints();
    InputPromptControlStyle style=uiHints.getPromptStyle();
    InputPromptControlStyle cachedStyle=cachedUiHints == null ? null : cachedUiHints.getPromptStyle();
    if (cachedStyle == null || (style != null && cachedStyle.getValue() != style.getValue()))     reportParam.setControlType(style == null ? null : newROMControlType(style.getValue()));
  }
}