Program: 78192
Project: 78192
Buggy source:
private Map getParsedParameters(IViewerReportDesignHandle design,InputOptions options,Map parameters) throws ReportServiceException {
  Locale locale=(Locale)options.getOption(InputOptions.OPT_LOCALE);
  Collection parameterList=getParameterDefinitions(design,options);
  Map paramMap=new HashMap();
  IGetParameterDefinitionTask task=null;
  Map configMap=null;
  Boolean isDesignerBoolean=(Boolean)options.getOption(InputOptions.OPT_IS_DESIGNER);
  boolean isDesigner=(isDesignerBoolean != null ? isDesignerBoolean.booleanValue() : false);
  try {
    task=getParameterDefinitionTask(design.getFileName());
    IReportRunnable runnable=ReportEngineService.getInstance().openReportDesign(design.getFileName());
    configMap=runnable.getTestConfig();
  }
 catch (  EngineException e) {
    throw new ReportServiceException(e.getLocalizedMessage());
  }
  for (Iterator iter=parameterList.iterator(); iter.hasNext(); ) {
    IScalarParameterDefn parameterObj=(IScalarParameterDefn)iter.next();
    String paramValue=null;
    Object paramValueObj=null;
    ScalarParameterHandle paramHandle=(ScalarParameterHandle)parameterObj.getHandle();
    String paramName=paramHandle.getName();
    String format=paramHandle.getPattern();
    ReportParameterConverter converter=new ReportParameterConverter(format,locale);
    Set paramNames=null;
    if (parameters != null) {
      paramNames=parameters.keySet();
    }
    if (parameters != null && paramName != null) {
      boolean found=false;
      for (Iterator it=paramNames.iterator(); it.hasNext(); ) {
        String name=(String)it.next();
        if (paramName.equals(name)) {
          paramValue=(String)parameters.get(name);
          paramValueObj=converter.parse(paramValue,ParameterDataTypeConverter.getEngineDataType(paramHandle.getDataType()));
          paramMap.put(paramName,paramValueObj);
          found=true;
          break;
        }
      }
      if (!found && configMap.containsKey(paramName) && isDesigner) {
        String configValue=(String)configMap.get(paramName);
        ReportParameterConverter cfgConverter=new ReportParameterConverter(format,Locale.US);
        paramValueObj=cfgConverter.parse(configValue,parameterObj.getDataType());
      }
 else       if (!found) {
        paramValueObj=task.getDefaultValue(parameterObj.getName());
      }
    }
  }
  return paramMap;
}

Fixed version (ground truth):
private Map getParsedParameters(IViewerReportDesignHandle design,InputOptions options,Map parameters) throws ReportServiceException {
  Locale locale=(Locale)options.getOption(InputOptions.OPT_LOCALE);
  Collection parameterList=getParameterDefinitions(design,options);
  Map paramMap=new HashMap();
  IGetParameterDefinitionTask task=null;
  Map configMap=null;
  Boolean isDesignerBoolean=(Boolean)options.getOption(InputOptions.OPT_IS_DESIGNER);
  boolean isDesigner=(isDesignerBoolean != null ? isDesignerBoolean.booleanValue() : false);
  try {
    task=getParameterDefinitionTask(design.getFileName());
    IReportRunnable runnable=ReportEngineService.getInstance().openReportDesign(design.getFileName());
    configMap=runnable.getTestConfig();
  }
 catch (  EngineException e) {
    throw new ReportServiceException(e.getLocalizedMessage());
  }
  for (Iterator iter=parameterList.iterator(); iter.hasNext(); ) {
    IScalarParameterDefn parameterObj=(IScalarParameterDefn)iter.next();
    String paramValue=null;
    Object paramValueObj=null;
    ScalarParameterHandle paramHandle=(ScalarParameterHandle)parameterObj.getHandle();
    String paramName=paramHandle.getName();
    String format=paramHandle.getPattern();
    ReportParameterConverter converter=new ReportParameterConverter(format,locale);
    Set paramNames=null;
    if (parameters != null) {
      paramNames=parameters.keySet();
    }
    if (parameters != null && paramName != null) {
      boolean found=false;
      for (Iterator it=paramNames.iterator(); it.hasNext(); ) {
        String name=(String)it.next();
        if (paramName.equals(name)) {
          if (parameters.get(name) != null)           paramValue=parameters.get(name).toString();
          paramValueObj=converter.parse(paramValue,ParameterDataTypeConverter.getEngineDataType(paramHandle.getDataType()));
          paramMap.put(paramName,paramValueObj);
          found=true;
          break;
        }
      }
      if (!found && configMap.containsKey(paramName) && isDesigner) {
        String configValue=(String)configMap.get(paramName);
        ReportParameterConverter cfgConverter=new ReportParameterConverter(format,Locale.US);
        paramValueObj=cfgConverter.parse(configValue,parameterObj.getDataType());
      }
 else       if (!found) {
        paramValueObj=task.getDefaultValue(parameterObj.getName());
      }
    }
  }
  return paramMap;
}