Program: 67171
Project: 67171
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 {
          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));
    }
  }
}

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(modelParamBinding.getExpressionListHandle().getListValue().get(0)));
    }
  }
  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));
    }
  }
}