nus-yam/ex-repair huggingface dataset:
Program: 76371
Project: 76371
Buggy source:
/** 
 * @see org.eclipse.birt.report.service.api.IViewerReportService#getPage(java.lang.String,java.lang.String,org.eclipse.birt.report.service.api.InputOptions,java.util.List)
 */
public ByteArrayOutputStream getPage(String docName,String pageID,InputOptions renderOptions,List activeIds) throws ReportServiceException {
  IReportDocument doc=ReportEngineService.getInstance().openReportDocument(getReportDesignName(renderOptions),docName,getModuleOptions(renderOptions));
  HttpServletRequest request=(HttpServletRequest)renderOptions.getOption(InputOptions.OPT_REQUEST);
  Locale locale=(Locale)renderOptions.getOption(InputOptions.OPT_LOCALE);
  String format=(String)renderOptions.getOption(InputOptions.OPT_FORMAT);
  Boolean isMasterPageContent=(Boolean)renderOptions.getOption(InputOptions.OPT_IS_MASTER_PAGE_CONTENT);
  Boolean svgFlag=(Boolean)renderOptions.getOption(InputOptions.OPT_SVG_FLAG);
  Long pageNum=Long.valueOf(pageID);
  Boolean isRtl=(Boolean)renderOptions.getOption(InputOptions.OPT_RTL);
  try {
    ByteArrayOutputStream os=ReportEngineService.getInstance().renderReport(request,doc,format,pageNum.longValue(),isMasterPageContent.booleanValue(),svgFlag.booleanValue(),activeIds,locale,isRtl.booleanValue());
    return os;
  }
 catch (  RemoteException e) {
    throw new ReportServiceException(e.getLocalizedMessage(),e);
  }
 finally {
    if (doc != null)     doc.close();
  }
}

Fixed version (ground truth):
/** 
 * @see org.eclipse.birt.report.service.api.IViewerReportService#getPage(java.lang.String,java.lang.String,org.eclipse.birt.report.service.api.InputOptions,java.util.List)
 */
public ByteArrayOutputStream getPage(String docName,String pageID,InputOptions renderOptions,List activeIds) throws ReportServiceException {
  IReportDocument doc=ReportEngineService.getInstance().openReportDocument(getReportDesignName(renderOptions),docName,getModuleOptions(renderOptions));
  HttpServletRequest request=(HttpServletRequest)renderOptions.getOption(InputOptions.OPT_REQUEST);
  Locale locale=(Locale)renderOptions.getOption(InputOptions.OPT_LOCALE);
  String format=(String)renderOptions.getOption(InputOptions.OPT_FORMAT);
  Boolean isMasterPageContent=(Boolean)renderOptions.getOption(InputOptions.OPT_IS_MASTER_PAGE_CONTENT);
  Boolean svgFlag=(Boolean)renderOptions.getOption(InputOptions.OPT_SVG_FLAG);
  Long pageNum=Long.valueOf(pageID);
  Boolean isRtl=(Boolean)renderOptions.getOption(InputOptions.OPT_RTL);
  try {
    ByteArrayOutputStream os=ReportEngineService.getInstance().renderReport(request,doc,format,pageNum.longValue(),isMasterPageContent.booleanValue(),svgFlag.booleanValue(),activeIds,locale,isRtl.booleanValue());
    return os;
  }
 catch (  RemoteException e) {
    throw new ReportServiceException(e.getLocalizedMessage(),e.getCause());
  }
 finally {
    if (doc != null)     doc.close();
  }
}
Program: 76373
Project: 76373
Buggy source:
/** 
 * Returns report runnable object
 * @param design
 * @param moduleOptions
 * @return
 * @throws ReportServiceException
 */
public IReportRunnable getReportRunnable(IViewerReportDesignHandle design,Map moduleOptions) throws ReportServiceException {
  IReportRunnable runnable;
  if (design.getContentType() == IViewerReportDesignHandle.RPT_RUNNABLE_OBJECT) {
    runnable=(IReportRunnable)design.getDesignObject();
  }
 else {
    try {
      runnable=ReportEngineService.getInstance().openReportDesign(design.getFileName(),moduleOptions);
    }
 catch (    EngineException e) {
      throw new ReportServiceException(e.getLocalizedMessage(),e);
    }
  }
  return runnable;
}

Fixed version (ground truth):
/** 
 * Returns report runnable object
 * @param design
 * @param moduleOptions
 * @return
 * @throws ReportServiceException
 */
public IReportRunnable getReportRunnable(IViewerReportDesignHandle design,Map moduleOptions) throws ReportServiceException {
  IReportRunnable runnable;
  if (design.getContentType() == IViewerReportDesignHandle.RPT_RUNNABLE_OBJECT) {
    runnable=(IReportRunnable)design.getDesignObject();
  }
 else {
    try {
      runnable=ReportEngineService.getInstance().openReportDesign(design.getFileName(),moduleOptions);
    }
 catch (    EngineException e) {
      throw new ReportServiceException(e.getLocalizedMessage(),e.getCause());
    }
  }
  return runnable;
}
Program: 76374
Project: 76374
Buggy source:
/** 
 * @see org.eclipse.birt.report.service.api.IViewerReportService#runReport(org.eclipse.birt.report.service.api.IViewerReportDesignHandle,java.lang.String,org.eclipse.birt.report.service.api.InputOptions,java.util.Map,java.util.Map)
 */
public String runReport(IViewerReportDesignHandle design,String outputDocName,InputOptions runOptions,Map parameters,Map displayTexts) throws ReportServiceException {
  IReportRunnable runnable;
  HttpServletRequest request=(HttpServletRequest)runOptions.getOption(InputOptions.OPT_REQUEST);
  Locale locale=(Locale)runOptions.getOption(InputOptions.OPT_LOCALE);
  ViewerAttributeBean attrBean=(ViewerAttributeBean)request.getAttribute(IBirtConstants.ATTRIBUTE_BEAN);
  Map parsedParams=attrBean.getParameters();
  if (parameters != null) {
    parsedParams.putAll(parameters);
  }
  Map displayTextMap=attrBean.getDisplayTexts();
  if (displayTexts != null) {
    displayTextMap.putAll(displayTexts);
  }
  runnable=(IReportRunnable)design.getDesignObject();
  try {
    ReportEngineService.getInstance().runReport(request,runnable,outputDocName,locale,parsedParams,displayTextMap);
  }
 catch (  RemoteException e) {
    throw new ReportServiceException(e.getLocalizedMessage(),e);
  }
  return outputDocName;
}

Fixed version (ground truth):
/** 
 * @see org.eclipse.birt.report.service.api.IViewerReportService#runReport(org.eclipse.birt.report.service.api.IViewerReportDesignHandle,java.lang.String,org.eclipse.birt.report.service.api.InputOptions,java.util.Map,java.util.Map)
 */
public String runReport(IViewerReportDesignHandle design,String outputDocName,InputOptions runOptions,Map parameters,Map displayTexts) throws ReportServiceException {
  IReportRunnable runnable;
  HttpServletRequest request=(HttpServletRequest)runOptions.getOption(InputOptions.OPT_REQUEST);
  Locale locale=(Locale)runOptions.getOption(InputOptions.OPT_LOCALE);
  ViewerAttributeBean attrBean=(ViewerAttributeBean)request.getAttribute(IBirtConstants.ATTRIBUTE_BEAN);
  Map parsedParams=attrBean.getParameters();
  if (parameters != null) {
    parsedParams.putAll(parameters);
  }
  Map displayTextMap=attrBean.getDisplayTexts();
  if (displayTexts != null) {
    displayTextMap.putAll(displayTexts);
  }
  runnable=(IReportRunnable)design.getDesignObject();
  try {
    ReportEngineService.getInstance().runReport(request,runnable,outputDocName,locale,parsedParams,displayTextMap);
  }
 catch (  RemoteException e) {
    throw new ReportServiceException(e.getLocalizedMessage(),e.getCause());
  }
  return outputDocName;
}
Program: 76375
Project: 76375
Buggy source:
/** 
 * @see org.eclipse.birt.report.service.api.IViewerReportService#getParameterValues(java.lang.String,org.eclipse.birt.report.service.api.InputOptions)
 * @deprecated     
 */
public Map getParameterValues(String docName,InputOptions options) throws ReportServiceException {
  IReportDocument doc=ReportEngineService.getInstance().openReportDocument(getReportDesignName(options),docName,getModuleOptions(options));
  Map paramValues=doc.getParameterValues();
  doc.close();
  return paramValues;
}

Fixed version (ground truth):
/** 
 * @see org.eclipse.birt.report.service.api.IViewerReportService#getParameterValues(java.lang.String,org.eclipse.birt.report.service.api.InputOptions)
 * @deprecated
 */
public Map getParameterValues(String docName,InputOptions options) throws ReportServiceException {
  IReportDocument doc=ReportEngineService.getInstance().openReportDocument(getReportDesignName(options),docName,getModuleOptions(options));
  Map paramValues=doc.getParameterValues();
  doc.close();
  return paramValues;
}
Program: 76376
Project: 76376
Buggy source:
/** 
 * @see org.eclipse.birt.report.service.api.IViewerReportService#getImage(java.lang.String,java.lang.String,java.io.OutputStream,org.eclipse.birt.report.service.api.InputOptions)
 */
public void getImage(String docName,String imageId,OutputStream out,InputOptions options) throws ReportServiceException {
  try {
    HttpServletRequest request=(HttpServletRequest)options.getOption(InputOptions.OPT_REQUEST);
    ReportEngineService.getInstance().renderImage(imageId,request,out);
  }
 catch (  RemoteException e) {
    throw new ReportServiceException(e.getLocalizedMessage(),e);
  }
}

Fixed version (ground truth):
/** 
 * @see org.eclipse.birt.report.service.api.IViewerReportService#getImage(java.lang.String,java.lang.String,java.io.OutputStream,org.eclipse.birt.report.service.api.InputOptions)
 */
public void getImage(String docName,String imageId,OutputStream out,InputOptions options) throws ReportServiceException {
  try {
    HttpServletRequest request=(HttpServletRequest)options.getOption(InputOptions.OPT_REQUEST);
    ReportEngineService.getInstance().renderImage(imageId,request,out);
  }
 catch (  RemoteException e) {
    throw new ReportServiceException(e.getLocalizedMessage(),e.getCause());
  }
}
Program: 76379
Project: 76379
Buggy source:
/** 
 * Render image.
 * @param imageId
 * @param request
 * @param outputStream
 * @throws RemoteException
 */
public void renderImage(String imageId,HttpServletRequest request,OutputStream outputStream) throws RemoteException {
  assert(this.imageHandler != null);
  try {
    this.imageHandler.getImage(outputStream,ParameterAccessor.getImageTempFolder(request),imageId);
  }
 catch (  EngineException e) {
    AxisFault fault=new AxisFault(e.getLocalizedMessage(),e);
    fault.setFaultCode(new QName("String_Node_Str"));
    fault.setFaultString(e.getLocalizedMessage());
    throw fault;
  }
}

Fixed version (ground truth):
/** 
 * Render image.
 * @param imageId
 * @param request
 * @param outputStream
 * @throws RemoteException
 */
public void renderImage(String imageId,HttpServletRequest request,OutputStream outputStream) throws RemoteException {
  assert(this.imageHandler != null);
  try {
    this.imageHandler.getImage(outputStream,ParameterAccessor.getImageTempFolder(request),imageId);
  }
 catch (  EngineException e) {
    AxisFault fault=new AxisFault(e.getLocalizedMessage(),e.getCause());
    fault.setFaultCode(new QName("String_Node_Str"));
    throw fault;
  }
}
Program: 76380
Project: 76380
Buggy source:
protected abstract void runReport() throws RemoteException ;

Fixed version (ground truth):
protected abstract void runReport() throws Exception ;
Program: 76381
Project: 76381
Buggy source:
protected void __execute() throws Exception {
  context.getResponse().setContentType("String_Node_Str");
  String imageId=context.getRequest().getParameter(ParameterAccessor.PARAM_IMAGEID);
  ServletOutputStream out;
  String docName=null;
  InputOptions options=new InputOptions();
  options.setOption(InputOptions.OPT_REQUEST,context.getRequest());
  out=context.getResponse().getOutputStream();
  getReportService().getImage(docName,imageId,out,options);
}

Fixed version (ground truth):
public void __execute() throws Exception {
  context.getResponse().setContentType("String_Node_Str");
  String imageId=context.getRequest().getParameter(ParameterAccessor.PARAM_IMAGEID);
  ServletOutputStream out;
  String docName=null;
  InputOptions options=new InputOptions();
  options.setOption(InputOptions.OPT_REQUEST,context.getRequest());
  out=context.getResponse().getOutputStream();
  getReportService().getImage(docName,imageId,out,options);
}
Program: 76382
Project: 76382
Buggy source:
protected void runReport() throws RemoteException {
  IActionHandler handler=new BirtRunReportActionHandler(context,operation,response);
  handler.execute();
}

Fixed version (ground truth):
protected void runReport() throws Exception {
  BirtRunReportActionHandler handler=new BirtRunReportActionHandler(context,operation,response);
  handler.__execute();
}
Program: 76383
Project: 76383
Buggy source:
/** 
 */
protected void __checkDocumentExists() throws RemoteException {
  File file=new File(__docName);
  if (!file.exists()) {
    IActionHandler handler=new BirtRunReportActionHandler(context,operation,response);
    handler.execute();
  }
  file=new File(__docName);
  if (!file.exists()) {
    AxisFault fault=new AxisFault();
    fault.setFaultReason(BirtResources.getMessage(ResourceConstants.ACTION_EXCEPTION_NO_REPORT_DOCUMENT));
    throw fault;
  }
 else {
    BaseAttributeBean bean=(BaseAttributeBean)context.getBean();
    if (bean.isDocumentProcessing()) {
      AxisFault fault=new AxisFault();
      fault.setFaultReason(BirtResources.getMessage(ResourceConstants.GENERAL_EXCEPTION_DOCUMENT_FILE_PROCESSING));
      throw fault;
    }
  }
}

Fixed version (ground truth):
/** 
 * Check whether document existed
 */
protected void __checkDocumentExists() throws Exception {
  File file=new File(__docName);
  if (!file.exists()) {
    BirtRunReportActionHandler handler=new BirtRunReportActionHandler(context,operation,response);
    handler.__execute();
  }
  file=new File(__docName);
  if (!file.exists()) {
    AxisFault fault=new AxisFault();
    fault.setFaultReason(BirtResources.getMessage(ResourceConstants.ACTION_EXCEPTION_NO_REPORT_DOCUMENT));
    throw fault;
  }
 else {
    BaseAttributeBean bean=(BaseAttributeBean)context.getBean();
    if (bean.isDocumentProcessing()) {
      AxisFault fault=new AxisFault();
      fault.setFaultReason(BirtResources.getMessage(ResourceConstants.GENERAL_EXCEPTION_DOCUMENT_FILE_PROCESSING));
      throw fault;
    }
  }
}
Program: 76384
Project: 76384
Buggy source:
/** 
 */
protected String __getReportDocument(){
  return __bean.getReportDocumentName();
}

Fixed version (ground truth):
/** 
 * Returns report document name
 */
protected String __getReportDocument(){
  return __bean.getReportDocumentName();
}
Program: 76387
Project: 76387
Buggy source:
/** 
 * Anything before do service.
 * @param request incoming http request
 * @param response http response
 * @exception ServletException
 * @exception IOException
 */
protected void doPreService(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException {
  String format=ParameterAccessor.getFormat(request);
  String openType=ParameterAccessor.getOpenType(request);
  if (IBirtConstants.SERVLET_PATH_DOWNLOAD.equalsIgnoreCase(request.getServletPath())) {
    response.setContentType("String_Node_Str");
    response.setHeader("String_Node_Str","String_Node_Str");
  }
 else {
    if (ParameterAccessor.PARAM_FORMAT_PDF.equalsIgnoreCase(format)) {
      response.setContentType("String_Node_Str");
    }
 else {
      String mimeType=ReportEngineService.getInstance().getMIMEType(format);
      if (mimeType != null && mimeType.length() > 0)       response.setContentType(mimeType);
 else       response.setContentType("String_Node_Str");
    }
    String filename=ParameterAccessor.generateFileName(request);
    response.setHeader("String_Node_Str",openType + "String_Node_Str" + filename+ "String_Node_Str");
  }
}

Fixed version (ground truth):
/** 
 * Anything before do service.
 * @param request incoming http request
 * @param response http response
 * @exception ServletException
 * @exception IOException
 */
protected void doPreService(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException {
  String format=ParameterAccessor.getFormat(request);
  String openType=ParameterAccessor.getOpenType(request);
  if (IBirtConstants.SERVLET_PATH_DOWNLOAD.equalsIgnoreCase(request.getServletPath())) {
    response.setContentType("String_Node_Str");
    response.setHeader("String_Node_Str","String_Node_Str");
  }
 else {
    if (ParameterAccessor.PARAM_FORMAT_PDF.equalsIgnoreCase(format)) {
      response.setContentType("String_Node_Str");
    }
 else {
      String mimeType=ReportEngineService.getInstance().getMIMEType(format);
      if (mimeType != null && mimeType.length() > 0)       response.setContentType(mimeType);
 else       response.setContentType("String_Node_Str");
    }
    if (!ParameterAccessor.isGetImageOperator(request)) {
      String filename=ParameterAccessor.generateFileName(request);
      response.setHeader("String_Node_Str",openType + "String_Node_Str" + filename+ "String_Node_Str");
    }
  }
}
Program: 76388
Project: 76388
Buggy source:
/** 
 * Generates a file name for the pdf output.
 * @param request
 * @return the file name
 */
public static String generateFileName(HttpServletRequest request){
}

Fixed version (ground truth):
/** 
 * Generates a file name for the pdf output.
 * @param request
 * @return the file name
 */
public static String generateFileName(HttpServletRequest request){
  String defaultName="String_Node_Str";
  String fileName=defaultName;
  BaseAttributeBean attrBean=(BaseAttributeBean)request.getAttribute(IBirtConstants.ATTRIBUTE_BEAN);
  if (attrBean == null)   return fileName;
  String baseName=attrBean.getReportDesignName();
  if (baseName == null || baseName.length() == 0)   baseName=attrBean.getReportDocumentName();
  if (baseName == null || baseName.trim().length() <= 0)   return fileName;
  int index=baseName.lastIndexOf('/');
  if (index == -1)   index=baseName.lastIndexOf('\\');
  if (index != -1) {
    baseName=baseName.substring(index + 1);
  }
  int dotIndex=baseName.lastIndexOf('.');
  if (dotIndex > 0) {
    fileName=baseName.substring(0,dotIndex);
  }
  for (int i=0; i < fileName.length(); i++) {
    char c=fileName.charAt(i);
    if (c < 0x00 || c >= 0x80) {
      fileName=defaultName;
      break;
    }
  }
  return fileName;
}
Program: 76389
Project: 76389
Buggy source:
/** 
 * @return whether the parameter allow empty string as input. If not, theend user has to supply a string value that is non-empty
 */
boolean allowBlank();

Fixed version (ground truth):
/** 
 * @deprecated
 * @return whether the parameter allow empty string as input. If not, theend user has to supply a string value that is non-empty
 */
boolean allowBlank();
Program: 76390
Project: 76390
Buggy source:
/** 
 * @return whether the parameter allow null value. If it does not, the enduser has to supply a value for the parameter before the report can be run
 */
boolean allowNull();

Fixed version (ground truth):
/** 
 * @deprecated
 * @return whether the parameter allow null value. If it does not, the enduser has to supply a value for the parameter before the report can be run
 */
boolean allowNull();
Program: 76394
Project: 76394
Buggy source:
private Collection getChoicesFromParameterQuery(ScalarParameterHandle parameter){
  String dataType=parameter.getDataType();
  boolean fixedOrder=parameter.isFixedOrder();
  String dataSetName=parameter.getDataSetName();
  String valueExpr=parameter.getValueExpr();
  String labelExpr=parameter.getLabelExpr();
  int limit=parameter.getListlimit();
  String pattern=parameter.getPattern();
  return createDynamicSelectionChoices(pattern,dataSetName,labelExpr,valueExpr,dataType,limit,fixedOrder);
}

Fixed version (ground truth):
private Collection getChoicesFromParameterQuery(ScalarParameterHandle parameter){
  String dataType=parameter.getDataType();
  boolean fixedOrder=parameter.isFixedOrder();
  String dataSetName=parameter.getDataSetName();
  String valueExpr=parameter.getValueExpr();
  String labelExpr=parameter.getLabelExpr();
  boolean isDistinct=parameter.distinct();
  String sortDirection=parameter.getSortDirection();
  String sortBy=parameter.getSortBy();
  int limit=parameter.getListlimit();
  String pattern=parameter.getPattern();
  return createDynamicSelectionChoices(pattern,dataSetName,labelExpr,valueExpr,dataType,limit,fixedOrder,isDistinct,sortDirection,sortBy);
}
Program: 76395
Project: 76395
Buggy source:
/** 
 * @param allowBlank
 */
public void setAllowBlank(boolean allowBlank){
  this.allowBlank=allowBlank;
}

Fixed version (ground truth):
/** 
 * @deprecated
 * @param allowBlank
 */
public void setAllowBlank(boolean allowBlank){
  this.allowBlank=allowBlank;
}
Program: 76396
Project: 76396
Buggy source:
/** 
 * @param allowNull whether allow null value for the specific parameter
 */
public void setAllowNull(boolean allowNull){
  this.allowNull=allowNull;
}

Fixed version (ground truth):
/** 
 * @deprecated
 * @param allowNull whether allow null value for the specific parameter
 */
public void setAllowNull(boolean allowNull){
  this.allowNull=allowNull;
}
Program: 76397
Project: 76397
Buggy source:
public boolean allowNull(){
  return allowNull;
}

Fixed version (ground truth):
public boolean allowNull(){
  return !isRequired();
}
Program: 76398
Project: 76398
Buggy source:
public boolean allowBlank(){
  return allowBlank;
}

Fixed version (ground truth):
public boolean allowBlank(){
  return !isRequired();
}
Program: 76399
Project: 76399
Buggy source:
public SelectionChoiceComparator(boolean sortDisplayValue,String format,ULocale locale){
  this.sortDisplayValue=sortDisplayValue;
  this.format=format;
  this.locale=locale;
  if (null == this.locale) {
    this.locale=ULocale.getDefault();
  }
}

Fixed version (ground truth):
public SelectionChoiceComparator(boolean sortDisplayValue,String format,boolean sortDirection,ULocale locale){
  this.sortDirection=sortDirection;
  this.sortDisplayValue=sortDisplayValue;
  this.format=format;
  this.locale=locale;
  if (null == this.locale) {
    this.locale=ULocale.getDefault();
  }
}
Program: 76400
Project: 76400
Buggy source:
public int compare(Object o1,Object o2){
  if ((o1 instanceof IParameterSelectionChoice) && (o2 instanceof IParameterSelectionChoice)) {
    Object value1;
    Object value2;
    if (sortDisplayValue) {
      value1=((IParameterSelectionChoice)o1).getLabel();
      value2=((IParameterSelectionChoice)o2).getLabel();
      if (null == value1) {
        value1=getDisplayValue(((IParameterSelectionChoice)o1).getValue());
      }
      if (null == value2) {
        value2=getDisplayValue(((IParameterSelectionChoice)o2).getValue());
      }
    }
 else {
      value1=((IParameterSelectionChoice)o1).getValue();
      value2=((IParameterSelectionChoice)o2).getValue();
    }
    if (value1 == value2) {
      return 0;
    }
    if (value1 == null) {
      return -1;
    }
    if (value2 == null) {
      return 1;
    }
    if ((value1 instanceof Boolean) && (value2 instanceof Boolean)) {
      if (((Boolean)value1).booleanValue() ^ ((Boolean)value1).booleanValue()) {
        return 0;
      }
      return ((Boolean)value1).booleanValue() ? 1 : -1;
    }
    if (value1 instanceof Comparable) {
      return ((Comparable)value1).compareTo(value2);
    }
    if (value2 instanceof Comparable) {
      return -((Comparable)value2).compareTo(value1);
    }
  }
  return -1;
}

Fixed version (ground truth):
public int compare(Object o1,Object o2){
  int compareResult=-1;
  if ((o1 instanceof IParameterSelectionChoice) && (o2 instanceof IParameterSelectionChoice)) {
    Object value1;
    Object value2;
    if (sortDisplayValue) {
      value1=((IParameterSelectionChoice)o1).getLabel();
      value2=((IParameterSelectionChoice)o2).getLabel();
      if (null == value1) {
        value1=getDisplayValue(((IParameterSelectionChoice)o1).getValue());
      }
      if (null == value2) {
        value2=getDisplayValue(((IParameterSelectionChoice)o2).getValue());
      }
    }
 else {
      value1=((IParameterSelectionChoice)o1).getValue();
      value2=((IParameterSelectionChoice)o2).getValue();
    }
    if (value1 == value2) {
      return 0;
    }
 else     if (value1 == null) {
      return -1;
    }
 else     if (value2 == null) {
      return 1;
    }
    if ((value1 instanceof Boolean) && (value2 instanceof Boolean)) {
      if (((Boolean)value1).booleanValue() ^ ((Boolean)value1).booleanValue()) {
        compareResult=0;
      }
 else {
        compareResult=((Boolean)value1).booleanValue() ? 1 : -1;
      }
      return resultByDirection(compareResult);
    }
    if (value1 instanceof Comparable || value2 instanceof Comparable) {
      if (value1 instanceof Comparable) {
        compareResult=((Comparable)value1).compareTo(value2);
      }
 else {
        compareResult=-((Comparable)value2).compareTo(value1);
      }
      return resultByDirection(compareResult);
    }
  }
  return resultByDirection(compareResult);
}
Program: 76407
Project: 76407
Buggy source:
/** 
 * @param stopSign
 * @throws IOException
 * @throws BirtException
 */
private void populateSortedFactRows(StopSign stopSign) throws IOException, BirtException {
  Row4AggregationPopulator aggregationRowPopulator=new Row4AggregationPopulator(dimesionResultIterators,facttableRowIterator);
  prepareSortedStacks();
  int measureCount=facttableRowIterator.getMeasureCount();
  while (facttableRowIterator.next() && !stopSign.isStopped()) {
    for (int i=0; i < allSortedFactRows.size(); i++) {
      DiskSortedStackWrapper diskSortedStackWriter=((DiskSortedStackWrapper)allSortedFactRows.get(i));
      int[] levelIndex=diskSortedStackWriter.levelIndex;
      Row4Aggregation aggregationRow=new Row4Aggregation();
      aggregationRow.levelMembers=aggregationRowPopulator.getLevelMembers(levelIndex);
      if (aggregationRow.levelMembers == null) {
        continue;
      }
      aggregationRow.measures=new Object[measureCount];
      for (int j=0; j < measureCount; j++) {
        aggregationRow.measures[j]=facttableRowIterator.getMeasure(j);
      }
      diskSortedStackWriter.diskSortedStack.push(aggregationRow);
    }
  }
}

Fixed version (ground truth):
/** 
 * @param stopSign
 * @throws IOException
 * @throws BirtException
 */
private void populateSortedFactRows(StopSign stopSign) throws IOException, BirtException {
  Row4AggregationPopulator aggregationRowPopulator=new Row4AggregationPopulator(dimesionResultIterators,facttableRowIterator);
  prepareSortedStacks();
  int measureCount=facttableRowIterator.getMeasureCount();
  while (facttableRowIterator.next() && !stopSign.isStopped()) {
    for (int i=0; i < allSortedFactRows.size(); i++) {
      DiskSortedStackWrapper diskSortedStackWrapper=((DiskSortedStackWrapper)allSortedFactRows.get(i));
      int[] levelIndex=diskSortedStackWrapper.levelIndex;
      Row4Aggregation aggregationRow=new Row4Aggregation();
      aggregationRow.levelMembers=aggregationRowPopulator.getLevelMembers(levelIndex);
      if (aggregationRow.levelMembers == null) {
        continue;
      }
      aggregationRow.measures=new Object[measureCount];
      for (int j=0; j < measureCount; j++) {
        aggregationRow.measures[j]=facttableRowIterator.getMeasure(j);
      }
      diskSortedStackWrapper.diskSortedStack.push(aggregationRow);
    }
  }
}
Program: 76409
Project: 76409
Buggy source:
/** 
 * @param p the scalar parameter
 * @param expr the default value expression
 */
protected Object stringToObject(int type,String value) throws BirtException {
  if (value == null) {
    return null;
  }
switch (type) {
case IScalarParameterDefn.TYPE_BOOLEAN:
    return DataTypeUtil.toBoolean(value);
case IScalarParameterDefn.TYPE_DATE_TIME:
  return DataTypeUtil.toDate(value);
case IScalarParameterDefn.TYPE_DECIMAL:
return DataTypeUtil.toBigDecimal(value);
case IScalarParameterDefn.TYPE_FLOAT:
return DataTypeUtil.toDouble(value);
case IScalarParameterDefn.TYPE_STRING:
return DataTypeUtil.toString(value);
case IScalarParameterDefn.TYPE_INTEGER:
return DataTypeUtil.toInteger(value);
}
return null;
}

Fixed version (ground truth):
/** 
 * @param p the scalar parameter
 * @param expr the default value expression
 */
protected Object stringToObject(int type,String value) throws BirtException {
  if (value == null) {
    return null;
  }
switch (type) {
case IScalarParameterDefn.TYPE_BOOLEAN:
    return DataTypeUtil.toBoolean(value);
case IScalarParameterDefn.TYPE_DATE:
  return DataTypeUtil.toSqlDate(value);
case IScalarParameterDefn.TYPE_TIME:
return DataTypeUtil.toSqlTime(value);
case IScalarParameterDefn.TYPE_DATE_TIME:
return DataTypeUtil.toDate(value);
case IScalarParameterDefn.TYPE_DECIMAL:
return DataTypeUtil.toBigDecimal(value);
case IScalarParameterDefn.TYPE_FLOAT:
return DataTypeUtil.toDouble(value);
case IScalarParameterDefn.TYPE_STRING:
return DataTypeUtil.toString(value);
case IScalarParameterDefn.TYPE_INTEGER:
return DataTypeUtil.toInteger(value);
}
return null;
}
Program: 76410
Project: 76410
Buggy source:
/** 
 * set parameter choice value. The string value is in English locale, and needs to be parsed back into object value based on the data type. 
 * @param value the string value for the object
 * @param type the parameter data type
 */
public void setValue(String value,int type){
  try {
switch (type) {
case IScalarParameterDefn.TYPE_BOOLEAN:
      this.value=DataTypeUtil.toBoolean(value);
    break;
case IScalarParameterDefn.TYPE_DATE_TIME:
  this.value=DataTypeUtil.toDate(value);
break;
case IScalarParameterDefn.TYPE_DECIMAL:
this.value=DataTypeUtil.toBigDecimal(value);
break;
case IScalarParameterDefn.TYPE_FLOAT:
this.value=DataTypeUtil.toDouble(value);
break;
case IScalarParameterDefn.TYPE_INTEGER:
this.value=DataTypeUtil.toInteger(value);
break;
case IScalarParameterDefn.TYPE_STRING:
default :
this.value=DataTypeUtil.toString(value);
break;
}
}
 catch (BirtException e) {
log.log(Level.SEVERE,e.getLocalizedMessage(),e);
this.value=null;
}
}

Fixed version (ground truth):
/** 
 * set parameter choice value. The string value is in English locale, and needs to be parsed back into object value based on the data type. 
 * @param value the string value for the object
 * @param type the parameter data type
 */
public void setValue(String value,int type){
  try {
switch (type) {
case IScalarParameterDefn.TYPE_BOOLEAN:
      this.value=DataTypeUtil.toBoolean(value);
    break;
case IScalarParameterDefn.TYPE_DATE_TIME:
  this.value=DataTypeUtil.toDate(value);
break;
case IScalarParameterDefn.TYPE_DECIMAL:
this.value=DataTypeUtil.toBigDecimal(value);
break;
case IScalarParameterDefn.TYPE_FLOAT:
this.value=DataTypeUtil.toDouble(value);
break;
case IScalarParameterDefn.TYPE_INTEGER:
this.value=DataTypeUtil.toInteger(value);
break;
case IScalarParameterDefn.TYPE_DATE:
this.value=DataTypeUtil.toSqlDate(value);
case IScalarParameterDefn.TYPE_TIME:
this.value=DataTypeUtil.toSqlTime(value);
case IScalarParameterDefn.TYPE_STRING:
default :
this.value=DataTypeUtil.toString(value);
break;
}
}
 catch (BirtException e) {
log.log(Level.SEVERE,e.getLocalizedMessage(),e);
this.value=null;
}
}
Program: 76413
Project: 76413
Buggy source:
/** 
 * Test "FetchRowLimit" feature. The fetch row limit is the number of rows that a data set can fetch from data source. In this test case the limit is set to  3, which indicate to max three rows should be fetched from data source.
 * @throws Exception
 */
public void testFetchRowLimit2() throws Exception {
  this.fetchRowLimit(3);
}

Fixed version (ground truth):
/** 
 * Test "FetchRowLimit" feature. The fetch row limit is the number of rows that a data set can fetch from data source. In this test case the limit is set to 3, which indicate to max three rows should be fetched from data source.
 * @throws Exception
 */
public void testFetchRowLimit2() throws Exception {
  this.fetchRowLimit(3);
}
Program: 76414
Project: 76414
Buggy source:
/** 
 * Test "FetchRowLimit" feature. The fetch row limit is the number of rows that a data set can fetch from data source. In this test case the limit is set to  zero, which indicate no limit at all.
 * @throws Exception
 */
public void testFetchRowLimit1() throws Exception {
  this.fetchRowLimit(0);
}

Fixed version (ground truth):
/** 
 * Test "FetchRowLimit" feature. The fetch row limit is the number of rows that a data set can fetch from data source. In this test case the limit is set to zero, which indicate no limit at all.
 * @throws Exception
 */
public void testFetchRowLimit1() throws Exception {
  this.fetchRowLimit(0);
}
Program: 76415
Project: 76415
Buggy source:
/** 
 * Test "FetchRowLimit" feature. The fetch row limit is the number of rows that a data set can fetch from data source. In this test case the limit is set to  negative number, which indicate no limit at all.
 * @throws Exception
 */
public void testFetchRowLimit3() throws Exception {
  this.fetchRowLimit(-10);
}

Fixed version (ground truth):
/** 
 * Test "FetchRowLimit" feature. The fetch row limit is the number of rows that a data set can fetch from data source. In this test case the limit is set to negative number, which indicate no limit at all.
 * @throws Exception
 */
public void testFetchRowLimit3() throws Exception {
  this.fetchRowLimit(-10);
}
Program: 76418
Project: 76418
Buggy source:
/** 
 * Test feature of duplicate column name from different tables
 */
public void test10_DuplicateColName() throws Exception {
  String testSQL="String_Node_Str" + getTestTableName();
  ((OdaDataSetDesign)this.dataSet).setQueryText(testSQL);
  String[] bindingNameRow=new String[2];
  bindingNameRow[0]="String_Node_Str";
  bindingNameRow[1]="String_Node_Str";
  IBaseExpression[] bindingExprRow=new IBaseExpression[2];
  bindingExprRow[0]=new ScriptExpression("String_Node_Str");
  bindingExprRow[1]=new ScriptExpression("String_Node_Str");
  QueryDefinition queryDefn=this.createQuery(null,null,null,null,null,null,null,null,null,bindingNameRow,bindingExprRow);
  IPreparedQuery preparedQuery=dataEngine.prepare(queryDefn);
  IQueryResults queryResults=preparedQuery.execute(null);
  IResultIterator resultIt=queryResults.getResultIterator();
  assertTrue(resultIt.next());
  resultIt.getValue(bindingNameRow[0]);
  resultIt.getValue(bindingNameRow[1]);
}

Fixed version (ground truth):
/** 
 * Test feature of duplicate column name from different tables
 */
public void test10_DuplicateColName() throws Exception {
  String testSQL="String_Node_Str" + getTestTableName();
  ((OdaDataSetDesign)this.dataSet).setQueryText(testSQL);
  String[] bindingNameRow=new String[2];
  bindingNameRow[0]="String_Node_Str";
  bindingNameRow[1]="String_Node_Str";
  IBaseExpression[] bindingExprRow=new IBaseExpression[2];
  bindingExprRow[0]=new ScriptExpression("String_Node_Str");
  bindingExprRow[1]=new ScriptExpression("String_Node_Str");
  QueryDefinition queryDefn=this.createQuery(null,null,null,null,null,null,null,null,null,bindingNameRow,bindingExprRow);
  try {
    IPreparedQuery preparedQuery=dataEngine.prepare(queryDefn);
    IQueryResults queryResults=preparedQuery.execute(null);
    queryResults.getResultIterator();
    fail("String_Node_Str");
  }
 catch (  DataException e) {
  }
}
Program: 76419
Project: 76419
Buggy source:
/** 
 * A standard report, test feature of:  group, sort, filter.
 */
public void test2() throws Exception {
  String[] bindingNameSort=new String[1];
  bindingNameSort[0]="String_Node_Str";
  IBaseExpression[] bindingExprSort=new IBaseExpression[1];
  bindingExprSort[0]=new ScriptExpression("String_Node_Str");
  SortDefinition[] sortDefn=new SortDefinition[]{new SortDefinition()};
  sortDefn[0].setExpression("String_Node_Str");
  sortDefn[0].setSortDirection(ISortDefinition.SORT_DESC);
  String[] bindingNameRow=new String[6];
  bindingNameRow[0]="String_Node_Str";
  bindingNameRow[1]="String_Node_Str";
  bindingNameRow[2]="String_Node_Str";
  bindingNameRow[3]="String_Node_Str";
  bindingNameRow[4]="String_Node_Str";
  bindingNameRow[5]="String_Node_Str";
  IBaseExpression[] bindingExprRow=new IBaseExpression[6];
  bindingExprRow[0]=new ScriptExpression("String_Node_Str");
  bindingExprRow[1]=new ScriptExpression("String_Node_Str");
  bindingExprRow[2]=new ScriptExpression("String_Node_Str");
  bindingExprRow[3]=new ScriptExpression("String_Node_Str");
  bindingExprRow[4]=new ScriptExpression("String_Node_Str");
  bindingExprRow[5]=new ScriptExpression("String_Node_Str");
  createAndRunQuery(null,null,null,bindingNameSort,bindingExprSort,sortDefn,null,null,null,bindingNameRow,bindingExprRow);
  checkOutputFile();
}

Fixed version (ground truth):
/** 
 * A standard report, test feature of: group, sort, filter.
 */
public void test2() throws Exception {
  String[] bindingNameSort=new String[1];
  bindingNameSort[0]="String_Node_Str";
  IBaseExpression[] bindingExprSort=new IBaseExpression[1];
  bindingExprSort[0]=new ScriptExpression("String_Node_Str");
  SortDefinition[] sortDefn=new SortDefinition[]{new SortDefinition()};
  sortDefn[0].setExpression("String_Node_Str");
  sortDefn[0].setSortDirection(ISortDefinition.SORT_DESC);
  String[] bindingNameRow=new String[6];
  bindingNameRow[0]="String_Node_Str";
  bindingNameRow[1]="String_Node_Str";
  bindingNameRow[2]="String_Node_Str";
  bindingNameRow[3]="String_Node_Str";
  bindingNameRow[4]="String_Node_Str";
  bindingNameRow[5]="String_Node_Str";
  IBaseExpression[] bindingExprRow=new IBaseExpression[6];
  bindingExprRow[0]=new ScriptExpression("String_Node_Str");
  bindingExprRow[1]=new ScriptExpression("String_Node_Str");
  bindingExprRow[2]=new ScriptExpression("String_Node_Str");
  bindingExprRow[3]=new ScriptExpression("String_Node_Str");
  bindingExprRow[4]=new ScriptExpression("String_Node_Str");
  bindingExprRow[5]=new ScriptExpression("String_Node_Str");
  createAndRunQuery(null,null,null,bindingNameSort,bindingExprSort,sortDefn,null,null,null,bindingNameRow,bindingExprRow);
  checkOutputFile();
}
Program: 76420
Project: 76420
Buggy source:
public void setUp(){
  List columnsList=new ArrayList();
  ResultFieldMetadata columnMetaData=new ResultFieldMetadata(1,"String_Node_Str","String_Node_Str",DataType.getClass(DataType.STRING_TYPE),"String_Node_Str",true);
  columnsList.add(columnMetaData);
  resultObjects=new ResultObject[]{new ResultObject(new ResultClass(columnsList),new Object[]{"String_Node_Str"}),new ResultObject(new ResultClass(columnsList),new Object[]{"String_Node_Str"})};
}

Fixed version (ground truth):
public void setUp() throws DataException {
  List columnsList=new ArrayList();
  ResultFieldMetadata columnMetaData=new ResultFieldMetadata(1,"String_Node_Str","String_Node_Str",DataType.getClass(DataType.STRING_TYPE),"String_Node_Str",true);
  columnsList.add(columnMetaData);
  resultObjects=new ResultObject[]{new ResultObject(new ResultClass(columnsList),new Object[]{"String_Node_Str"}),new ResultObject(new ResultClass(columnsList),new Object[]{"String_Node_Str"})};
}
Program: 76421
Project: 76421
Buggy source:
/** 
 * @return
 */
private ResultClass getResultClass(){
  ArrayList columnList=new ArrayList();
  ResultFieldMetadata metaData=null;
  metaData=new ResultFieldMetadata(1,"String_Node_Str","String_Node_Str",Integer.class,Integer.class.getName(),false);
  columnList.add(metaData);
  metaData=new ResultFieldMetadata(2,"String_Node_Str","String_Node_Str",Double.class,Double.class.getName(),false);
  columnList.add(metaData);
  metaData=new ResultFieldMetadata(3,"String_Node_Str","String_Node_Str",BigDecimal.class,BigDecimal.class.getName(),false);
  columnList.add(metaData);
  metaData=new ResultFieldMetadata(4,"String_Node_Str","String_Node_Str",Date.class,Date.class.getName(),false);
  columnList.add(metaData);
  metaData=new ResultFieldMetadata(5,"String_Node_Str","String_Node_Str",Time.class,Time.class.getName(),false);
  columnList.add(metaData);
  metaData=new ResultFieldMetadata(6,"String_Node_Str","String_Node_Str",Timestamp.class,Timestamp.class.getName(),false);
  columnList.add(metaData);
  metaData=new ResultFieldMetadata(7,"String_Node_Str","String_Node_Str",byte[].class,byte[].class.getName(),false);
  columnList.add(metaData);
  metaData=new ResultFieldMetadata(8,"String_Node_Str","String_Node_Str",String.class,String.class.getName(),false);
  columnList.add(metaData);
  ResultClass reClass=new ResultClass(columnList);
  return reClass;
}

Fixed version (ground truth):
/** 
 * @return
 * @throws DataException 
 */
private ResultClass getResultClass() throws DataException {
  ArrayList columnList=new ArrayList();
  ResultFieldMetadata metaData=null;
  metaData=new ResultFieldMetadata(1,"String_Node_Str","String_Node_Str",Integer.class,Integer.class.getName(),false);
  columnList.add(metaData);
  metaData=new ResultFieldMetadata(2,"String_Node_Str","String_Node_Str",Double.class,Double.class.getName(),false);
  columnList.add(metaData);
  metaData=new ResultFieldMetadata(3,"String_Node_Str","String_Node_Str",BigDecimal.class,BigDecimal.class.getName(),false);
  columnList.add(metaData);
  metaData=new ResultFieldMetadata(4,"String_Node_Str","String_Node_Str",Date.class,Date.class.getName(),false);
  columnList.add(metaData);
  metaData=new ResultFieldMetadata(5,"String_Node_Str","String_Node_Str",Time.class,Time.class.getName(),false);
  columnList.add(metaData);
  metaData=new ResultFieldMetadata(6,"String_Node_Str","String_Node_Str",Timestamp.class,Timestamp.class.getName(),false);
  columnList.add(metaData);
  metaData=new ResultFieldMetadata(7,"String_Node_Str","String_Node_Str",byte[].class,byte[].class.getName(),false);
  columnList.add(metaData);
  metaData=new ResultFieldMetadata(8,"String_Node_Str","String_Node_Str",String.class,String.class.getName(),false);
  columnList.add(metaData);
  ResultClass reClass=new ResultClass(columnList);
  return reClass;
}
Program: 76422
Project: 76422
Buggy source:
/** 
 */
public void testGetTargetLevel(){
  assertEquals("String_Node_Str",OlapExpressionUtil.getTargetLevel("String_Node_Str"));
  assertEquals(null,OlapExpressionUtil.getTargetLevel("String_Node_Str"));
}

Fixed version (ground truth):
/** 
 */
public void testGetTargetLevel(){
}
Program: 76423
Project: 76423
Buggy source:
public IResultClass getResultClass(){
  return new ResultClass(new ArrayList());
}

Fixed version (ground truth):
public IResultClass getResultClass(){
}
Program: 76424
Project: 76424
Buggy source:
/** 
 * @param inExprMetas
 */
void init(ExprMetaInfo[] inExprMetas,IExprDataReader exprDataReader){
  this.exprMetas=ExprMetaUtil.buildExprDataMetaInfo(inExprMetas);
  this.rsMeta=ExprMetaUtil.buildExprDataResultClass(exprMetas);
  this.exprDataReader=exprDataReader;
}

Fixed version (ground truth):
/** 
 * @param inExprMetas
 * @throws DataException 
 */
void init(ExprMetaInfo[] inExprMetas,IExprDataReader exprDataReader) throws DataException {
  this.exprMetas=ExprMetaUtil.buildExprDataMetaInfo(inExprMetas);
  this.rsMeta=ExprMetaUtil.buildExprDataResultClass(exprMetas);
  this.exprDataReader=exprDataReader;
}
Program: 76425
Project: 76425
Buggy source:
/** 
 * @param inputStreamMeta
 * @return
 * @throws DataException
 */
public static IResultClass buildExprDataResultClass(ExprMetaInfo[] exprMetas){
  List newProjectedColumns=new ArrayList();
  for (int i=0; i < exprMetas.length; i++) {
    String name=exprMetas[i].getName();
    Class clazz=DataType.getClass(exprMetas[i].getDataType());
    ResultFieldMetadata metaData=new ResultFieldMetadata(0,name,name,clazz,clazz == null ? null : clazz.toString(),i == exprMetas.length - 1 ? true : false);
    newProjectedColumns.add(metaData);
  }
  return new ResultClass(newProjectedColumns);
}

Fixed version (ground truth):
/** 
 * @param inputStreamMeta
 * @return
 * @throws DataException 
 * @throws DataException
 */
public static IResultClass buildExprDataResultClass(ExprMetaInfo[] exprMetas) throws DataException {
  List newProjectedColumns=new ArrayList();
  for (int i=0; i < exprMetas.length; i++) {
    String name=exprMetas[i].getName();
    Class clazz=DataType.getClass(exprMetas[i].getDataType());
    ResultFieldMetadata metaData=new ResultFieldMetadata(0,name,name,clazz,clazz == null ? null : clazz.toString(),i == exprMetas.length - 1 ? true : false);
    newProjectedColumns.add(metaData);
  }
  return new ResultClass(newProjectedColumns);
}
Program: 76426
Project: 76426
Buggy source:
private ResultClass doGetResultClass(List projectedColumns){
  String methodName="String_Node_Str";
  sm_logger.entering(sm_className,methodName,projectedColumns);
  assert(projectedColumns != null);
  ResultClass ret=new ResultClass(projectedColumns);
  sm_logger.exiting(sm_className,methodName,ret);
  return ret;
}

Fixed version (ground truth):
private ResultClass doGetResultClass(List projectedColumns) throws DataException {
  String methodName="String_Node_Str";
  sm_logger.entering(sm_className,methodName,projectedColumns);
  assert(projectedColumns != null);
  ResultClass ret=new ResultClass(projectedColumns);
  sm_logger.exiting(sm_className,methodName,ret);
  return ret;
}
Program: 76430
Project: 76430
Buggy source:
/** 
 * register dataset of this item. <p> if dataset design of this item is not null, create a new <code>DataSet</code> object by the dataset design. open the dataset, move cursor to the first record , register the first row to script context, and return this <code>DataSet</code> object if dataset design is null, or open error, or empty resultset, return null.
 * @param item the report item design
 * @return the DataSet object if not null, else return null
 */
protected void executeQuery(){
  rset=null;
  IDataQueryDefinition query=design.getQuery();
  IBaseResultSet parentRset=getParentResultSet();
  context.setResultSet(parentRset);
  if (query != null) {
    try {
      rset=(IQueryResultSet)context.executeQuery(parentRset,query);
      context.setResultSet(rset);
      if (rset != null) {
        rsetEmpty=!rset.next();
        return;
      }
    }
 catch (    BirtException ex) {
      context.addException(ex);
    }
  }
}

Fixed version (ground truth):
/** 
 * register dataset of this item. <p> if dataset design of this item is not null, create a new <code>DataSet</code> object by the dataset design. open the dataset, move cursor to the first record , register the first row to script context, and return this <code>DataSet</code> object if dataset design is null, or open error, or empty resultset, return null.
 * @param item the report item design
 * @return the DataSet object if not null, else return null
 */
protected void executeQuery(){
  rset=null;
  IDataQueryDefinition query=design.getQuery();
  IBaseResultSet parentRset=getParentResultSet();
  context.setResultSet(parentRset);
  if (query != null) {
    try {
      rset=(IQueryResultSet)context.executeQuery(parentRset,query);
      context.setResultSet(rset);
      if (rset != null) {
        rsetEmpty=!rset.next();
        return;
      }
    }
 catch (    BirtException ex) {
      rsetEmpty=true;
      context.addException(ex);
    }
  }
}
Program: 76433
Project: 76433
Buggy source:
/** 
 * Map oda data type to model data type.
 * @param modelDataType
 * @return
 */
public static String toModelDataType(int modelDataType){
  if (modelDataType == DataType.INTEGER_TYPE)   return DesignChoiceConstants.COLUMN_DATA_TYPE_INTEGER;
 else   if (modelDataType == DataType.STRING_TYPE)   return DesignChoiceConstants.COLUMN_DATA_TYPE_STRING;
 else   if (modelDataType == DataType.DATE_TYPE)   return DesignChoiceConstants.COLUMN_DATA_TYPE_DATETIME;
 else   if (modelDataType == DataType.DECIMAL_TYPE)   return DesignChoiceConstants.COLUMN_DATA_TYPE_DECIMAL;
 else   if (modelDataType == DataType.DOUBLE_TYPE)   return DesignChoiceConstants.COLUMN_DATA_TYPE_FLOAT;
  return DesignChoiceConstants.COLUMN_DATA_TYPE_ANY;
}

Fixed version (ground truth):
/** 
 * Map oda data type to model data type.
 * @param modelDataType
 * @return
 */
public static String toModelDataType(int modelDataType){
  if (modelDataType == DataType.INTEGER_TYPE)   return DesignChoiceConstants.COLUMN_DATA_TYPE_INTEGER;
 else   if (modelDataType == DataType.STRING_TYPE)   return DesignChoiceConstants.COLUMN_DATA_TYPE_STRING;
 else   if (modelDataType == DataType.DATE_TYPE)   return DesignChoiceConstants.COLUMN_DATA_TYPE_DATETIME;
 else   if (modelDataType == DataType.DECIMAL_TYPE)   return DesignChoiceConstants.COLUMN_DATA_TYPE_DECIMAL;
 else   if (modelDataType == DataType.DOUBLE_TYPE)   return DesignChoiceConstants.COLUMN_DATA_TYPE_FLOAT;
 else   if (modelDataType == DataType.BOOLEAN_TYPE)   return DesignChoiceConstants.COLUMN_DATA_TYPE_BOOLEAN;
  return DesignChoiceConstants.COLUMN_DATA_TYPE_ANY;
}