Program: 67551
Project: 67551
Buggy source:
/** 
 * @param modelDataSet
 * @param dteDataSet
 * @throws AdapterException 
 */
private static void populateParameter(IModelAdapter adapter,DataSetHandle modelDataSet,BaseDataSetDesign dteDataSet) throws AdapterException {
  HashMap paramBindingCandidates=new HashMap();
  Iterator elmtIter=modelDataSet.parametersIterator();
  if (elmtIter != null) {
    while (elmtIter.hasNext()) {
      DataSetParameterHandle modelParam=(DataSetParameterHandle)elmtIter.next();
      if (modelParam.isInput()) {
        String defaultValueExpr=null;
        if (modelParam instanceof OdaDataSetParameterHandle && ((OdaDataSetParameterHandle)modelParam).getParamName() != null) {
          defaultValueExpr=ExpressionUtil.createJSParameterExpression((((OdaDataSetParameterHandle)modelParam).getParamName()));
          dteDataSet.addParameter(new ParameterAdapter(modelParam));
          paramBindingCandidates.put(modelParam.getName(),adapter.adaptExpression(defaultValueExpr,modelParam.getDataType()));
        }
 else {
          if (ExpressionType.CONSTANT.equals(modelParam.getExpressionProperty(DataSetParameter.DEFAULT_VALUE_MEMBER).getType())) {
            defaultValueExpr=JavascriptEvalUtil.transformToJsExpression(modelParam.getDefaultValue());
            dteDataSet.addParameter(new ParameterAdapter(modelParam));
            paramBindingCandidates.put(modelParam.getName(),adapter.adaptExpression(defaultValueExpr,modelParam.getDataType()));
          }
 else {
            ExpressionHandle handle=modelParam.getExpressionProperty(DataSetParameter.DEFAULT_VALUE_MEMBER);
            dteDataSet.addParameter(new ParameterAdapter(modelParam));
            paramBindingCandidates.put(modelParam.getName(),adapter.adaptExpression((Expression)handle.getValue(),modelParam.getDataType()));
          }
        }
      }
 else {
        dteDataSet.addParameter(new ParameterAdapter(modelParam));
      }
    }
  }
  elmtIter=modelDataSet.paramBindingsIterator();
  if (elmtIter != null) {
    while (elmtIter.hasNext()) {
      ParamBindingHandle modelParamBinding=(ParamBindingHandle)elmtIter.next();
      if (modelParamBinding.getExpression() != null)       paramBindingCandidates.put(modelParamBinding.getParamName(),adapter.adaptExpression((Expression)modelParamBinding.getExpressionProperty(ParamBinding.EXPRESSION_MEMBER).getValue()));
    }
  }
  if (paramBindingCandidates.size() > 0) {
    elmtIter=paramBindingCandidates.keySet().iterator();
    while (elmtIter.hasNext()) {
      Object paramName=elmtIter.next();
      assert(paramName != null && paramName instanceof String);
      ExpressionAdapter expression=(ExpressionAdapter)paramBindingCandidates.get(paramName);
      dteDataSet.addInputParamBinding(new InputParamBindingAdapter((String)paramName,expression));
    }
  }
}

Fixed version (ground truth):
/** 
 * @param modelDataSet
 * @param dteDataSet
 * @throws AdapterException 
 */
private static void populateParameter(IModelAdapter adapter,DataSetHandle modelDataSet,BaseDataSetDesign dteDataSet) throws AdapterException {
  HashMap paramBindingCandidates=new HashMap();
  Iterator elmtIter=modelDataSet.parametersIterator();
  if (elmtIter != null) {
    while (elmtIter.hasNext()) {
      DataSetParameterHandle modelParam=(DataSetParameterHandle)elmtIter.next();
      if (modelParam.isInput()) {
        String defaultValueExpr=null;
        if (modelParam instanceof OdaDataSetParameterHandle && ((OdaDataSetParameterHandle)modelParam).getParamName() != null) {
          defaultValueExpr=ExpressionUtil.createJSParameterExpression((((OdaDataSetParameterHandle)modelParam).getParamName()));
          dteDataSet.addParameter(new ParameterAdapter(modelParam));
          paramBindingCandidates.put(modelParam.getName(),adapter.adaptExpression(defaultValueExpr,modelParam.getDataType()));
        }
 else {
          ExpressionHandle handle=modelParam.getExpressionProperty(DataSetParameter.DEFAULT_VALUE_MEMBER);
          dteDataSet.addParameter(new ParameterAdapter(modelParam));
          paramBindingCandidates.put(modelParam.getName(),adapter.adaptExpression((Expression)handle.getValue(),modelParam.getDataType()));
        }
      }
 else {
        dteDataSet.addParameter(new ParameterAdapter(modelParam));
      }
    }
  }
  elmtIter=modelDataSet.paramBindingsIterator();
  if (elmtIter != null) {
    while (elmtIter.hasNext()) {
      ParamBindingHandle modelParamBinding=(ParamBindingHandle)elmtIter.next();
      if (modelParamBinding.getExpression() != null)       paramBindingCandidates.put(modelParamBinding.getParamName(),adapter.adaptExpression((Expression)modelParamBinding.getExpressionProperty(ParamBinding.EXPRESSION_MEMBER).getValue()));
    }
  }
  if (paramBindingCandidates.size() > 0) {
    elmtIter=paramBindingCandidates.keySet().iterator();
    while (elmtIter.hasNext()) {
      Object paramName=elmtIter.next();
      assert(paramName != null && paramName instanceof String);
      IScriptExpression expression=(IScriptExpression)paramBindingCandidates.get(paramName);
      dteDataSet.addInputParamBinding(new InputParameterBinding((String)paramName,expression));
    }
  }
}