nus-yam/ex-repair huggingface dataset:
Program: 67575
Project: 67575
Buggy source:
protected boolean refresh(){
  if (isPreviewing)   return false;
  isPreviewing=true;
  ModuleHandle model=getModel();
  if (!UIUtil.canPreviewWithErrors(model)) {
    isPreviewing=false;
    return false;
  }
  boolean isDisplay=false;
  showProgress();
  if (hasParameters()) {
    if (parameterDialog != null) {
      parameterDialog.open();
      if (parameterDialog.getReturnCode() == InputParameterHtmlDialog.RETURN_CODE_BROWSER_CLOSED) {
        isDisplay=true;
        if (isMissingParameter()) {
          return false;
        }
      }
 else {
        hideProgress();
      }
    }
  }
 else {
    isDisplay=true;
  }
  if (isDisplay) {
    display();
  }
  ReportRequest request=new ReportRequest(ReportPreviewFormPage.this);
  List list=new ArrayList();
  list.add(new Object());
  request.setSelectionObject(list);
  request.setType(ReportRequest.SELECTION);
  SessionHandleAdapter.getInstance().getMediator().notifyRequest(request);
  isPreviewing=false;
  return true;
}

Fixed version (ground truth):
protected boolean refresh(){
  if (isPreviewing)   return false;
  isPreviewing=true;
  ModuleHandle model=getModel();
  if (!UIUtil.canPreviewWithErrors(model)) {
    isPreviewing=false;
    return false;
  }
  boolean isDisplay=false;
  showProgress();
  if (hasParameters()) {
    if (parameterDialog != null) {
      parameterDialog.open();
      if (parameterDialog.getReturnCode() == InputParameterHtmlDialog.RETURN_CODE_BROWSER_CLOSED) {
        isDisplay=true;
        if (isMissingParameter()) {
          isPreviewing=false;
          return false;
        }
      }
 else {
        hideProgress();
      }
    }
  }
 else {
    isDisplay=true;
  }
  if (isDisplay) {
    display();
  }
  ReportRequest request=new ReportRequest(ReportPreviewFormPage.this);
  List list=new ArrayList();
  list.add(new Object());
  request.setSelectionObject(list);
  request.setType(ReportRequest.SELECTION);
  SessionHandleAdapter.getInstance().getMediator().notifyRequest(request);
  isPreviewing=false;
  return true;
}
Program: 67576
Project: 67576
Buggy source:
/** 
 * Add the parameters of left and right dataset to JointDatasetHandle.
 * @param dsHandle
 * @throws SemanticException
 */
private void setParameters(JointDataSetHandle dsHandle) throws SemanticException {
  List<DataSetParameter> params=null;
  PropertyHandle dsParameterHandle=dsHandle.getPropertyHandle(IDataSetModel.PARAMETERS_PROP);
  if (leftDataSetName.equals(rightDataSetName)) {
    params=getDataSetParameters(leftDataSetName + "String_Node_Str",leftHandle.getPropertyHandle(IDataSetModel.PARAMETERS_PROP),rightDataSetName + "String_Node_Str",rightHandle.getPropertyHandle(IDataSetModel.PARAMETERS_PROP));
  }
 else {
    params=getDataSetParameters(leftDataSetName,leftHandle.getPropertyHandle(IDataSetModel.PARAMETERS_PROP),rightDataSetName,rightHandle.getPropertyHandle(IDataSetModel.PARAMETERS_PROP));
  }
  if (params.size() == 0) {
    dsParameterHandle.clearValue();
  }
 else {
    Iterator iter=dsParameterHandle.iterator();
    int i=0;
    while (iter.hasNext() && i < params.size()) {
      DataSetParameterHandle parameterHandle=(DataSetParameterHandle)iter.next();
      updateDataSetParameterHandle(parameterHandle,params.get(i));
      i++;
    }
    while (i < dsParameterHandle.getListValue().size()) {
      dsParameterHandle.removeItem(dsParameterHandle.getListValue().size() - 1);
    }
    for (; i < params.size(); i++) {
      dsParameterHandle.addItem(params.get(i));
    }
  }
}

Fixed version (ground truth):
/** 
 * Add the parameters of left and right dataset to JointDatasetHandle.
 * @param dsHandle
 * @throws SemanticException
 */
private void setParameters(JointDataSetHandle dsHandle) throws SemanticException {
  List<DataSetParameter> params=null;
  PropertyHandle dsParameterHandle=dsHandle.getPropertyHandle(IDataSetModel.PARAMETERS_PROP);
  if (leftDataSetName.equals(rightDataSetName)) {
    params=getDataSetParameters(leftDataSetName + "String_Node_Str",leftHandle.getPropertyHandle(IDataSetModel.PARAMETERS_PROP),rightDataSetName + "String_Node_Str",rightHandle.getPropertyHandle(IDataSetModel.PARAMETERS_PROP));
  }
 else {
    params=getDataSetParameters(leftDataSetName,leftHandle.getPropertyHandle(IDataSetModel.PARAMETERS_PROP),rightDataSetName,rightHandle.getPropertyHandle(IDataSetModel.PARAMETERS_PROP));
  }
  if (params.size() == 0) {
    dsParameterHandle.clearValue();
  }
 else {
    Iterator iter=dsParameterHandle.iterator();
    int i=0;
    while (iter.hasNext() && i < params.size()) {
      DataSetParameterHandle parameterHandle=(DataSetParameterHandle)iter.next();
      updateDataSetParameterHandle(parameterHandle,params.get(i));
      i++;
    }
    if (dsParameterHandle.getListValue() != null)     while (i < dsParameterHandle.getListValue().size()) {
      dsParameterHandle.removeItem(dsParameterHandle.getListValue().size() - 1);
    }
    for (; i < params.size(); i++) {
      dsParameterHandle.addItem(params.get(i));
    }
  }
}
Program: 67577
Project: 67577
Buggy source:
public void initialize() throws BirtException {
  IPageContent pageContent=(IPageContent)content;
  if (context.isAutoPageBreak() && !context.isReserveDocumentPageNumbers()) {
    context.setPageNumber(context.getPageNumber() + 1);
    pageContent=createPageContent(pageContent);
  }
 else {
    long number=pageContent.getPageNumber();
    if (number > 0) {
      context.setPageNumber(number);
    }
  }
  createNewPage(pageContent);
  maxAvaWidth=page.getBody().getWidth();
  width=maxAvaWidth;
}

Fixed version (ground truth):
public void initialize() throws BirtException {
  IPageContent pageContent=(IPageContent)content;
  if (context.getEngineTaskType() == IEngineTask.TASK_RENDER) {
    if (context.isReserveDocumentPageNumbers()) {
      long number=pageContent.getPageNumber();
      if (number > 0) {
        context.setPageNumber(number);
      }
    }
 else {
      context.setPageNumber(context.getPageNumber() + 1);
      pageContent=createPageContent(pageContent);
    }
  }
 else {
    if (context.isAutoPageBreak()) {
      context.setPageNumber(context.getPageNumber() + 1);
      pageContent=createPageContent(pageContent);
    }
 else {
      long number=pageContent.getPageNumber();
      if (number > 0) {
        context.setPageNumber(number);
      }
    }
  }
  createNewPage(pageContent);
  maxAvaWidth=page.getBody().getWidth();
  width=maxAvaWidth;
}
Program: 67578
Project: 67578
Buggy source:
public void process(String value,StyleProperties sp){
  if (value != null && value.length() > 0) {
    DimensionType d=DimensionType.parserUnit(value);
    if (d != null) {
      sp.addProperty(StyleProperties.HEIGHT,d);
    }
  }
}

Fixed version (ground truth):
public void process(String value,StyleProperties sp){
  if (value != null && value.length() > 0) {
    DimensionType d=DimensionType.parserUnit(value);
    if (d != null) {
      String unit=d.getUnits();
      if (unit == null || unit.length() == 0) {
        d=new DimensionType(d.getMeasure(),DimensionType.UNITS_PX);
      }
      sp.addProperty(StyleProperties.HEIGHT,d);
    }
  }
}
Program: 67579
Project: 67579
Buggy source:
private void resolveConflict(int[] values,int maxTotal,int total,int start,boolean[] conflicted){
  int length=values.length - start;
  if (length == 0) {
    return;
  }
  assert(length > 0);
  if (total > maxTotal) {
    int othersTotal=total - values[start];
    if (values[start] > 0) {
      values[start]=0;
      conflicted[start]=true;
    }
    resolveConflict(values,maxTotal,othersTotal,start + 1,conflicted);
  }
}

Fixed version (ground truth):
private void resolveConflict(int[] values,int maxTotal,int total,int start,boolean[] conflicted){
  int length=values.length - start;
  if (length == 0) {
    return;
  }
  assert(length > 0);
  if (total > maxTotal || total < 0) {
    int othersTotal=total - values[start];
    if (values[start] > 0) {
      values[start]=0;
      conflicted[start]=true;
    }
    resolveConflict(values,maxTotal,othersTotal,start + 1,conflicted);
  }
}
Program: 67580
Project: 67580
Buggy source:
/** 
 * Create base evaluator for chart using data set.
 * @param handle
 * @param cm
 * @param columnExpression
 * @return
 * @throws ChartException
 */
@SuppressWarnings("String_Node_Str") private IDataRowExpressionEvaluator createBaseEvaluator(ExtendedItemHandle handle,Chart cm,List<String> columnExpression) throws ChartException {
  IQueryResults actualResultSet;
  BaseQueryHelper cbqh=new BaseQueryHelper(handle,cm);
  QueryDefinition queryDefn=(QueryDefinition)cbqh.createBaseQuery(columnExpression);
  try {
    setQueryDefinitionWithDataSet(handle,queryDefn);
    processQueryDefinition(queryDefn);
    actualResultSet=executeDataSetQuery(queryDefn);
    if (actualResultSet != null) {
      if (ChartReportItemUtil.isOldChartUsingInternalGroup(itemHandle,cm)) {
        return createSimpleExpressionEvaluator(actualResultSet);
      }
 else {
        return new BaseGroupedQueryResultSetEvaluator(actualResultSet.getResultIterator(),ChartReportItemUtil.isSetSummaryAggregation(cm),cm);
      }
    }
  }
 catch (  BirtException e) {
    throw new ChartException(ChartReportItemUIActivator.ID,ChartException.DATA_BINDING,e);
  }
  return null;
}

Fixed version (ground truth):
/** 
 * Create base evaluator for chart using data set.
 * @param handle
 * @param cm
 * @param columnExpression
 * @return
 * @throws ChartException
 */
@SuppressWarnings("String_Node_Str") private IDataRowExpressionEvaluator createBaseEvaluator(ExtendedItemHandle handle,Chart cm,List<String> columnExpression) throws ChartException {
  IQueryResults actualResultSet;
  BaseQueryHelper cbqh=new BaseQueryHelper(handle,cm);
  QueryDefinition queryDefn=(QueryDefinition)cbqh.createBaseQuery(columnExpression);
  try {
    setQueryDefinitionWithDataSet(handle,queryDefn);
    processQueryDefinition(queryDefn);
    actualResultSet=executeDataSetQuery(queryDefn);
    if (actualResultSet != null) {
      if (ChartReportItemUtil.isOldChartUsingInternalGroup(itemHandle,cm)) {
        return createSimpleExpressionEvaluator(actualResultSet);
      }
 else {
        return new BaseGroupedQueryResultSetEvaluator(actualResultSet.getResultIterator(),ChartReportItemUtil.isSetSummaryAggregation(cm),cm,itemHandle);
      }
    }
  }
 catch (  BirtException e) {
    throw new ChartException(ChartReportItemUIActivator.ID,ChartException.DATA_BINDING,e);
  }
  return null;
}
Program: 67584
Project: 67584
Buggy source:
/** 
 * Creates a preset for the web module version >= 2.3
 * @see org.eclipse.wst.common.project.facet.core.IPresetFactory#createPreset(java.lang.String,java.util.Map)
 */
public PresetDefinition createPreset(final String presetId,final Map<String,Object> context) throws CoreException {
  final IFacetedProjectBase project=(IFacetedProjectBase)context.get(IDynamicPreset.CONTEXT_KEY_FACETED_PROJECT);
  final IProjectFacetVersion webFacetVersion=project.getProjectFacetVersion(WebFacetUtils.WEB_FACET);
  if (webFacetVersion != null && webFacetVersion.compareTo(WebFacetUtils.WEB_23) >= 0) {
    final Set<IProjectFacetVersion> facets=new HashSet<IProjectFacetVersion>();
    final IProjectFacet birtFacet=ProjectFacetsManager.getProjectFacet("String_Node_Str");
    final IProjectFacetVersion birtFacetVersion=birtFacet.getVersion("String_Node_Str");
    facets.add(birtFacetVersion);
    facets.add(webFacetVersion);
    facets.add(JavaFacetUtils.JAVA_50);
    return new PresetDefinition(Resources.BIRT_FACET_TEMPLATE_LABEL,Resources.BIRT_FACET_TEMPLATE_DESCRIPTION,facets);
  }
  return null;
}

Fixed version (ground truth):
/** 
 * Creates a preset for the web module version >= 2.3
 * @see org.eclipse.wst.common.project.facet.core.IPresetFactory#createPreset(java.lang.String,java.util.Map)
 */
public PresetDefinition createPreset(final String presetId,final Map<String,Object> context) throws CoreException {
  final IFacetedProjectBase project=(IFacetedProjectBase)context.get(IDynamicPreset.CONTEXT_KEY_FACETED_PROJECT);
  final IProjectFacetVersion webFacetVersion=project.getProjectFacetVersion(WebFacetUtils.WEB_FACET);
  if (webFacetVersion != null && webFacetVersion.compareTo(WebFacetUtils.WEB_23) >= 0) {
    final Set<IProjectFacetVersion> facets=new HashSet<IProjectFacetVersion>();
    final IProjectFacet birtFacet=ProjectFacetsManager.getProjectFacet(IBirtFacetConstants.BIRT_RUNTIME_FACET_ID);
    final IProjectFacetVersion birtFacetVersion=birtFacet.getVersion(IBirtFacetConstants.BIRT_RUNTIME_FACET_VERSION);
    facets.add(birtFacetVersion);
    facets.add(webFacetVersion);
    facets.add(JavaFacetUtils.JAVA_50);
    return new PresetDefinition(Resources.BIRT_FACET_TEMPLATE_LABEL,Resources.BIRT_FACET_TEMPLATE_DESCRIPTION,facets);
  }
  return null;
}
Program: 67585
Project: 67585
Buggy source:
private void createDataArea(){
  fDataArea=new ScrolledComposite(foSashForm,SWT.VERTICAL);
{
    GridLayout gl=new GridLayout();
    fDataArea.setLayout(gl);
    GridData gd=new GridData(GridData.FILL_VERTICAL);
    fDataArea.setLayoutData(gd);
    fDataArea.setExpandHorizontal(true);
    fDataArea.setExpandVertical(true);
  }
  Composite dataComposite=new Composite(fDataArea,SWT.NONE);
{
    GridLayout gl=new GridLayout(2,false);
    gl.marginLeft=fLeftSize.x;
    dataComposite.setLayout(gl);
    GridData gd=new GridData(GridData.FILL_BOTH);
    dataComposite.setLayoutData(gd);
  }
  fDataArea.setContent(dataComposite);
  getDataSheet().createDataSelector(dataComposite);
  GridData gd=new GridData();
  gd.widthHint=fRightSize.x - 40;
  new Label(dataComposite,SWT.NONE).setLayoutData(gd);
  getDataSheet().createDataDragSource(dataComposite);
  getDataSheet().createActionButtons(dataComposite);
  new Label(dataComposite,SWT.NONE);
}

Fixed version (ground truth):
private void createDataArea(){
  fDataArea=new ScrolledComposite(foSashForm,SWT.VERTICAL | SWT.V_SCROLL);
{
    GridLayout gl=new GridLayout();
    fDataArea.setLayout(gl);
    GridData gd=new GridData(GridData.FILL_VERTICAL);
    fDataArea.setLayoutData(gd);
    fDataArea.setExpandHorizontal(true);
    fDataArea.setExpandVertical(true);
  }
  Composite dataComposite=new Composite(fDataArea,SWT.NONE);
{
    GridLayout gl=new GridLayout(2,false);
    gl.marginLeft=fLeftSize.x;
    dataComposite.setLayout(gl);
    GridData gd=new GridData(GridData.FILL_BOTH);
    dataComposite.setLayoutData(gd);
  }
  fDataArea.setContent(dataComposite);
  getDataSheet().createDataSelector(dataComposite);
  GridData gd=new GridData();
  gd.widthHint=fRightSize.x - 40;
  new Label(dataComposite,SWT.NONE).setLayoutData(gd);
  getDataSheet().createDataDragSource(dataComposite);
  getDataSheet().createActionButtons(dataComposite);
  new Label(dataComposite,SWT.NONE);
  fDataArea.setMinHeight(fDataArea.computeSize(SWT.DEFAULT,SWT.DEFAULT).y);
}
Program: 67586
Project: 67586
Buggy source:
public String getDefaultAnalysisType(String dataType,String originalAnalysis){
  String defaultAnalysisType=null;
  if (!this.needToFocusOnOutput)   return originalAnalysis;
  if (originalAnalysis != null)   return originalAnalysis;
  if (dataType.equals(DesignChoiceConstants.COLUMN_DATA_TYPE_INTEGER) || dataType.equals(DesignChoiceConstants.COLUMN_DATA_TYPE_FLOAT) || dataType.equals(DesignChoiceConstants.COLUMN_DATA_TYPE_DECIMAL)) {
    defaultAnalysisType=DesignChoiceConstants.ANALYSIS_TYPE_MEASURE;
  }
 else   if (dataType.equals(DesignChoiceConstants.COLUMN_DATA_TYPE_STRING)) {
    defaultAnalysisType=DesignChoiceConstants.ANALYSIS_TYPE_ATTRIBUTE;
  }
 else   if (dataType.equals(DesignChoiceConstants.COLUMN_DATA_TYPE_TIME) || dataType.equals(DesignChoiceConstants.COLUMN_DATA_TYPE_DATE) || dataType.equals(DesignChoiceConstants.COLUMN_DATA_TYPE_DATETIME)) {
    defaultAnalysisType=DesignChoiceConstants.ANALYSIS_TYPE_DIMENSION;
  }
  return defaultAnalysisType;
}

Fixed version (ground truth):
public String getDefaultAnalysisType(String columnName,String dataType,String originalAnalysis){
  String defaultAnalysisType=null;
  if (!this.needToFocusOnOutput)   return originalAnalysis;
  if (originalAnalysis != null)   return originalAnalysis;
  if (dataType.equals(DesignChoiceConstants.COLUMN_DATA_TYPE_INTEGER) || dataType.equals(DesignChoiceConstants.COLUMN_DATA_TYPE_FLOAT) || dataType.equals(DesignChoiceConstants.COLUMN_DATA_TYPE_DECIMAL)) {
    defaultAnalysisType=DesignChoiceConstants.ANALYSIS_TYPE_MEASURE;
  }
 else   if (dataType.equals(DesignChoiceConstants.COLUMN_DATA_TYPE_STRING)) {
    defaultAnalysisType=DesignChoiceConstants.ANALYSIS_TYPE_ATTRIBUTE;
  }
 else   if (dataType.equals(DesignChoiceConstants.COLUMN_DATA_TYPE_TIME) || dataType.equals(DesignChoiceConstants.COLUMN_DATA_TYPE_DATE) || dataType.equals(DesignChoiceConstants.COLUMN_DATA_TYPE_DATETIME)) {
    defaultAnalysisType=DesignChoiceConstants.ANALYSIS_TYPE_DIMENSION;
  }
  if (columnName.length() >= 3) {
    String lastThreeLetters=columnName.substring(columnName.length() - 3);
    if (lastThreeLetters.equalsIgnoreCase("String_Node_Str")) {
      defaultAnalysisType=DesignChoiceConstants.ANALYSIS_TYPE_DIMENSION;
    }
  }
  if (columnName.length() >= 2) {
    String lastTwoLetters=columnName.substring(columnName.length() - 2);
    if (lastTwoLetters.equalsIgnoreCase("String_Node_Str")) {
      defaultAnalysisType=DesignChoiceConstants.ANALYSIS_TYPE_DIMENSION;
    }
  }
  return defaultAnalysisType;
}
Program: 67590
Project: 67590
Buggy source:
public void setLayoutPageHint(IPageHint pageHint){
  this.pageHint=pageHint;
}

Fixed version (ground truth):
public void setLayoutPageHint(IPageHint pageHint){
  this.pageHint=pageHint;
  context.setPaged(true);
}
Program: 67593
Project: 67593
Buggy source:
public ILayout createLayout(ContainerArea parent,LayoutContext context,IContent content){
switch (content.getContentType()) {
case IContent.DATA_CONTENT:
case IContent.LABEL_CONTENT:
case IContent.TEXT_CONTENT:
    if (PropertyUtil.isInlineElement(content)) {
      DimensionType width=content.getWidth();
      if (width != null) {
        return new BlockTextArea(parent,context,content);
      }
 else {
        return new InlineTextArea(parent,context,content);
      }
    }
 else {
      return new BlockTextArea(parent,context,content);
    }
case IContent.IMAGE_CONTENT:
  return new ImageAreaLayout(parent,context,(IImageContent)content);
case IContent.AUTOTEXT_CONTENT:
int type=((IAutoTextContent)content).getType();
if ((type == IAutoTextContent.TOTAL_PAGE || type == IAutoTextContent.UNFILTERED_TOTAL_PAGE) && ("String_Node_Str".equalsIgnoreCase(context.getFormat()) || context.getEngineTaskType() != IEngineTask.TASK_RENDER)) {
context.addUnresolvedContent(content);
return new TemplateAreaLayout(parent,context,content);
}
 else {
if (PropertyUtil.isInlineElement(content)) {
  return new InlineTextArea(parent,context,content);
}
 else {
  return new BlockTextArea(parent,context,content);
}
}
default :
return null;
}
}

Fixed version (ground truth):
public ILayout createLayout(ContainerArea parent,LayoutContext context,IContent content){
switch (content.getContentType()) {
case IContent.DATA_CONTENT:
case IContent.LABEL_CONTENT:
case IContent.TEXT_CONTENT:
    if (PropertyUtil.isInlineElement(content)) {
      DimensionType width=content.getWidth();
      if (width != null) {
        return new BlockTextArea(parent,context,content);
      }
 else {
        return new InlineTextArea(parent,context,content);
      }
    }
 else {
      return new BlockTextArea(parent,context,content);
    }
case IContent.IMAGE_CONTENT:
  return new ImageAreaLayout(parent,context,(IImageContent)content);
case IContent.AUTOTEXT_CONTENT:
int type=((IAutoTextContent)content).getType();
if ((type == IAutoTextContent.TOTAL_PAGE || type == IAutoTextContent.UNFILTERED_TOTAL_PAGE) && "String_Node_Str".equalsIgnoreCase(context.getFormat()) && (context.getEngineTaskType() == IEngineTask.TASK_RUNANDRENDER || (!context.isReserveDocumentPageNumbers() && context.getEngineTaskType() == IEngineTask.TASK_RENDER && context.getHtmlLayoutContext() != null && context.getHtmlLayoutContext().isPaged()))) {
context.addUnresolvedContent(content);
return new TemplateAreaLayout(parent,context,content);
}
 else {
if (PropertyUtil.isInlineElement(content)) {
  return new InlineTextArea(parent,context,content);
}
 else {
  return new BlockTextArea(parent,context,content);
}
}
default :
return null;
}
}
Program: 67599
Project: 67599
Buggy source:
private void showChart(Dimension dSize){
  Bounds bo=BoundsImpl.create(0,0,dSize.width,dSize.height);
  bo.scale(72d / idr.getDisplayServer().getDpiResolution());
  idr.setProperty(IDeviceRenderer.GRAPHICS_CONTEXT,gc);
  Generator gr=Generator.instance();
  gr.setHighContrast(Display.getCurrent().getHighContrast());
  ChartAdapter.beginIgnoreNotifications();
  cm.clearSections(IConstants.RUN_TIME);
  cm.createSampleRuntimeSeries();
  ChartAdapter.endIgnoreNotifications();
  try {
    Chart cmRunTime=cm.copyInstance();
    removeScaleInfoForSample(cmRunTime);
    RunTimeContext rtc=new RunTimeContext();
    rtc.setScriptingEnabled(false);
    rtc.setMessageLookup(new BIRTDesignerMessageLookup(crii.getHandle()));
    rtc.setRightToLeft(crii.isLayoutDirectionRTL());
    rtc.setRightToLeftText(crii.getHandle().isDirectionRTL());
    rtc.setResourceFinder(crii);
    rtc.setExternalizer(crii);
    boolean bPlotChart=ChartCubeUtil.isPlotChart(crii.getHandle());
    if (bPlotChart) {
      rtc.setSharedScale(createSharedScaleFromSampleData());
    }
    gr.render(idr,gr.build(idr.getDisplayServer(),cmRunTime,bo,null,rtc,new ChartReportStyleProcessor(crii.getHandle(),true)));
  }
 catch (  ChartException gex) {
    showException(gc,gex);
  }
}

Fixed version (ground truth):
private void showChart(Dimension dSize){
  Bounds bo=BoundsImpl.create(0,0,dSize.width,dSize.height);
  bo.scale(72d / idr.getDisplayServer().getDpiResolution());
  idr.setProperty(IDeviceRenderer.GRAPHICS_CONTEXT,gc);
  Generator gr=Generator.instance();
  if (Display.getCurrent().getHighContrast()) {
    Color color=Display.getDefault().getSystemColor(SWT.COLOR_LIST_BACKGROUND);
    ColorDefinition cd=ColorDefinitionImpl.create(color.getRed(),color.getGreen(),color.getBlue());
    gr.setDefaultBackground(cd);
  }
  ChartAdapter.beginIgnoreNotifications();
  cm.clearSections(IConstants.RUN_TIME);
  cm.createSampleRuntimeSeries();
  ChartAdapter.endIgnoreNotifications();
  try {
    Chart cmRunTime=cm.copyInstance();
    removeScaleInfoForSample(cmRunTime);
    RunTimeContext rtc=new RunTimeContext();
    rtc.setScriptingEnabled(false);
    rtc.setMessageLookup(new BIRTDesignerMessageLookup(crii.getHandle()));
    rtc.setRightToLeft(crii.isLayoutDirectionRTL());
    rtc.setRightToLeftText(crii.getHandle().isDirectionRTL());
    rtc.setResourceFinder(crii);
    rtc.setExternalizer(crii);
    boolean bPlotChart=ChartCubeUtil.isPlotChart(crii.getHandle());
    if (bPlotChart) {
      rtc.setSharedScale(createSharedScaleFromSampleData());
    }
    gr.render(idr,gr.build(idr.getDisplayServer(),cmRunTime,bo,null,rtc,new ChartReportStyleProcessor(crii.getHandle(),true)));
  }
 catch (  ChartException gex) {
    showException(gc,gex);
  }
}
Program: 67601
Project: 67601
Buggy source:
/** 
 * @param cubeHandle
 * @param dataBindingExpr
 * @param queryDefn
 * @param appContext
 * @return
 * @throws AdapterException
 */
public Iterator getMemberValueIterator(TabularCubeHandle cubeHandle,String dataBindingExpr,ICubeQueryDefinition queryDefn,Map appContext) throws AdapterException ;

Fixed version (ground truth):
/** 
 * @param cubeHandle
 * @param dataBindingExpr
 * @param queryDefn
 * @param appContext
 * @return
 * @throws AdapterException
 */
public Iterator getMemberValueIterator(CubeHandle cubeHandle,String dataBindingExpr,ICubeQueryDefinition queryDefn,Map appContext) throws AdapterException ;
Program: 67602
Project: 67602
Buggy source:
/** 
 * @param hierHandle
 * @return
 */
private static TabularCubeHandle acquireContainerCube(TabularHierarchyHandle hierHandle){
  DesignElementHandle handle=hierHandle.getContainer().getContainer();
  if (handle == null || !(handle instanceof TabularCubeHandle))   return null;
  return (TabularCubeHandle)handle;
}

Fixed version (ground truth):
/** 
 * @param hierHandle
 * @return
 */
private static CubeHandle acquireContainerCube(TabularHierarchyHandle hierHandle){
  DesignElementHandle handle=hierHandle.getContainer().getContainer();
  if (handle == null || !(handle instanceof CubeHandle))   return null;
  return (CubeHandle)handle;
}
Program: 67603
Project: 67603
Buggy source:
/** 
 * @param handle
 * @return
 */
private static Iterator getFilterIterator(TabularHierarchyHandle handle){
  if (handle.getDataSet() != null)   return handle.filtersIterator();
 else {
    TabularCubeHandle cubeHandle=DataRequestSessionImpl.acquireContainerCube(handle);
    if (cubeHandle != null)     return cubeHandle.filtersIterator();
  }
  return new ArrayList().iterator();
}

Fixed version (ground truth):
/** 
 * @param handle
 * @return
 */
private static Iterator getFilterIterator(TabularHierarchyHandle handle){
  if (handle.getDataSet() != null)   return handle.filtersIterator();
 else {
    CubeHandle cubeHandle=DataRequestSessionImpl.acquireContainerCube(handle);
    if (cubeHandle != null)     return cubeHandle.filtersIterator();
  }
  return new ArrayList().iterator();
}
Program: 67604
Project: 67604
Buggy source:
/** 
 * @param handle
 * @return
 */
private static String getDataSet(TabularHierarchyHandle handle){
  if (handle.getDataSet() != null)   return handle.getDataSet().getQualifiedName();
 else {
    TabularCubeHandle cubeHandle=acquireContainerCube(handle);
    if (cubeHandle != null)     return cubeHandle.getDataSet().getQualifiedName();
  }
  return null;
}

Fixed version (ground truth):
/** 
 * @param handle
 * @return
 */
private static String getDataSet(TabularHierarchyHandle handle){
  if (handle.getDataSet() != null)   return handle.getDataSet().getQualifiedName();
 else {
    CubeHandle cubeHandle=acquireContainerCube(handle);
    if (cubeHandle != null) {
      return cubeHandle.getElementProperty(ITabularCubeModel.DATA_SET_PROP).getQualifiedName();
    }
  }
  return null;
}
Program: 67605
Project: 67605
Buggy source:
protected void createCustomControls(Composite parent){
  Composite composite=new Composite(parent,SWT.NONE);
  GridLayout layout=new GridLayout();
  layout.numColumns=2;
  layout.marginTop=5;
  composite.setLayout(layout);
  GridData layoutData=new GridData(GridData.FILL_BOTH);
  layoutData.widthHint=320;
  layoutData.heightHint=200;
  composite.setLayoutData(layoutData);
  createDialogContents(composite);
}

Fixed version (ground truth):
protected void createCustomControls(Composite parent){
  Composite composite=new Composite(parent,SWT.NONE);
  GridLayout layout=new GridLayout();
  layout.numColumns=3;
  layout.marginTop=5;
  composite.setLayout(layout);
  GridData layoutData=new GridData(GridData.FILL_BOTH);
  layoutData.widthHint=320;
  layoutData.heightHint=200;
  composite.setLayoutData(layoutData);
  createDialogContents(composite);
}
Program: 67606
Project: 67606
Buggy source:
public void modifyText(ModifyEvent e){
  displayName=displayNameText.getText().trim();
}

Fixed version (ground truth):
public void modifyText(ModifyEvent e){
  displayNameKey=tx.getText().trim();
  validateSyntax();
}
Program: 67607
Project: 67607
Buggy source:
public String getColumnText(Object element,int columnIndex){
  String value=null;
  ColumnDefn defn=null;
  if (element instanceof ColumnDefn) {
    defn=(ColumnDefn)element;
  }
 else {
    return "String_Node_Str";
  }
switch (columnIndex) {
case 1:
{
      value=defn.getColumnName();
      break;
    }
case 2:
{
    if (defn != newDefn)     value=getTypeDisplayName(defn.getDataType());
    break;
  }
case 3:
{
  value=defn.getAlias();
  break;
}
case 4:
{
value=defn.getDisplayName();
break;
}
case 5:
{
value=defn.getHelpText();
break;
}
}
if (value == null) {
value="String_Node_Str";
}
return value;
}

Fixed version (ground truth):
public String getColumnText(Object element,int columnIndex){
  String value=null;
  ColumnDefn defn=null;
  if (element instanceof ColumnDefn) {
    defn=(ColumnDefn)element;
  }
 else {
    return "String_Node_Str";
  }
switch (columnIndex) {
case 1:
{
      value=defn.getColumnName();
      break;
    }
case 2:
{
    if (defn != newDefn)     value=getTypeDisplayName(defn.getDataType());
    break;
  }
case 3:
{
  value=defn.getAlias();
  break;
}
case 4:
{
value=defn.getDisplayName();
break;
}
case 5:
{
value=defn.getDisplayNameKey();
break;
}
}
if (value == null) {
value="String_Node_Str";
}
return value;
}
Program: 67608
Project: 67608
Buggy source:
protected void setTableLabelProvider(){
  viewer.getViewer().setLabelProvider(new ITableLabelProvider(){
    public Image getColumnImage(    Object element,    int columnIndex){
      return null;
    }
    public String getColumnText(    Object element,    int columnIndex){
      String value=null;
      ColumnDefn defn=null;
      if (element instanceof ColumnDefn) {
        defn=(ColumnDefn)element;
      }
 else {
        return "String_Node_Str";
      }
switch (columnIndex) {
case 1:
{
          value=defn.getColumnName();
          break;
        }
case 2:
{
        if (defn != newDefn)         value=getTypeDisplayName(defn.getDataType());
        break;
      }
case 3:
{
      value=defn.getAlias();
      break;
    }
case 4:
{
    value=defn.getDisplayName();
    break;
  }
case 5:
{
  value=defn.getHelpText();
  break;
}
}
if (value == null) {
value="String_Node_Str";
}
return value;
}
public void addListener(ILabelProviderListener listener){
}
public void dispose(){
}
public boolean isLabelProperty(Object element,String property){
return false;
}
public void removeListener(ILabelProviderListener listener){
}
}
);
}

Fixed version (ground truth):
protected void setTableLabelProvider(){
  viewer.getViewer().setLabelProvider(new ITableLabelProvider(){
    public Image getColumnImage(    Object element,    int columnIndex){
      return null;
    }
    public String getColumnText(    Object element,    int columnIndex){
      String value=null;
      ColumnDefn defn=null;
      if (element instanceof ColumnDefn) {
        defn=(ColumnDefn)element;
      }
 else {
        return "String_Node_Str";
      }
switch (columnIndex) {
case 1:
{
          value=defn.getColumnName();
          break;
        }
case 2:
{
        if (defn != newDefn)         value=getTypeDisplayName(defn.getDataType());
        break;
      }
case 3:
{
      value=defn.getAlias();
      break;
    }
case 4:
{
    value=defn.getDisplayName();
    break;
  }
case 5:
{
  value=defn.getDisplayNameKey();
  break;
}
}
if (value == null) {
value="String_Node_Str";
}
return value;
}
public void addListener(ILabelProviderListener listener){
}
public void dispose(){
}
public boolean isLabelProperty(Object element,String property){
return false;
}
public void removeListener(ILabelProviderListener listener){
}
}
);
}
Program: 67609
Project: 67609
Buggy source:
private void initColumnInfos(){
  if (this.columnDefn != null) {
    columnName=resolveNull(this.columnDefn.getColumnName());
    alias=resolveNull(this.columnDefn.getAlias());
    displayName=resolveNull(this.columnDefn.getDisplayName());
    this.dataType=getTypeIndex(this.columnDefn.getDataType());
  }
 else {
    columnName=EMPTY_STRING;
    alias=EMPTY_STRING;
    displayName=EMPTY_STRING;
    this.dataType=defaultDataTypeIndex;
  }
}

Fixed version (ground truth):
private void initColumnInfos(){
  if (this.columnDefn != null) {
    columnName=resolveNull(this.columnDefn.getColumnName());
    alias=resolveNull(this.columnDefn.getAlias());
    displayName=resolveNull(this.columnDefn.getDisplayName());
    displayNameKey=resolveNull(this.columnDefn.getDisplayNameKey());
    this.dataType=getTypeIndex(this.columnDefn.getDataType());
  }
 else {
    columnName=EMPTY_STRING;
    alias=EMPTY_STRING;
    displayName=EMPTY_STRING;
    displayNameKey=EMPTY_STRING;
    this.dataType=defaultDataTypeIndex;
  }
}
Program: 67611
Project: 67611
Buggy source:
protected void createTableColumns(){
  TableColumn column=new TableColumn(viewer.getViewer().getTable(),SWT.LEFT);
  column.setText("String_Node_Str");
  column.setResizable(false);
  column.setWidth(19);
  column=new TableColumn(viewer.getViewer().getTable(),SWT.LEFT);
  column.setText(Messages.getString("String_Node_Str"));
  column.setWidth(100);
  column=new TableColumn(viewer.getViewer().getTable(),SWT.LEFT);
  column.setText(Messages.getString("String_Node_Str"));
  column.setWidth(100);
  column=new TableColumn(viewer.getViewer().getTable(),SWT.LEFT);
  column.setText(Messages.getString("String_Node_Str"));
  column.setWidth(100);
  column=new TableColumn(viewer.getViewer().getTable(),SWT.LEFT);
  column.setText(Messages.getString("String_Node_Str"));
  column.setWidth(100);
}

Fixed version (ground truth):
protected void createTableColumns(){
  TableColumn column=new TableColumn(viewer.getViewer().getTable(),SWT.LEFT);
  column.setText("String_Node_Str");
  column.setResizable(false);
  column.setWidth(19);
  column=new TableColumn(viewer.getViewer().getTable(),SWT.LEFT);
  column.setText(Messages.getString("String_Node_Str"));
  column.setWidth(100);
  column=new TableColumn(viewer.getViewer().getTable(),SWT.LEFT);
  column.setText(Messages.getString("String_Node_Str"));
  column.setWidth(100);
  column=new TableColumn(viewer.getViewer().getTable(),SWT.LEFT);
  column.setText(Messages.getString("String_Node_Str"));
  column.setWidth(100);
  column=new TableColumn(viewer.getViewer().getTable(),SWT.LEFT);
  column.setText(Messages.getString("String_Node_Str"));
  column.setWidth(100);
  TableColumn displayNameKeyColumn=new TableColumn(viewer.getViewer().getTable(),SWT.LEFT);
  displayNameKeyColumn.setText(Messages.getString("String_Node_Str"));
  displayNameKeyColumn.setWidth(100);
}
Program: 67612
Project: 67612
Buggy source:
protected ColumnDefn getColumnDefn(){
  if (this.columnDefn == null) {
    this.columnDefn=new ColumnDefn();
  }
  this.columnDefn.setColumnName(columnName);
  this.columnDefn.setDataType(getTypeString(dataType));
  this.columnDefn.setAlias(alias);
  this.columnDefn.setDisplayName(displayName);
  return this.columnDefn;
}

Fixed version (ground truth):
protected ColumnDefn getColumnDefn(){
  if (this.columnDefn == null) {
    this.columnDefn=new ColumnDefn();
  }
  this.columnDefn.setColumnName(columnName);
  this.columnDefn.setDataType(getTypeString(dataType));
  this.columnDefn.setAlias(alias);
  this.columnDefn.setDisplayName(displayName);
  this.columnDefn.setDisplayNameKey(displayNameKey);
  return this.columnDefn;
}
Program: 67613
Project: 67613
Buggy source:
public void widgetSelected(SelectionEvent e){
  dataType=typeCombo.getSelectionIndex();
}

Fixed version (ground truth):
public void widgetSelected(SelectionEvent event){
  ResourceEditDialog dlg=new ResourceEditDialog(getShell(),Messages.getString("String_Node_Str"));
  dlg.setResourceURLs(getResourceURLs());
  if (dlg.open() == Window.OK) {
    tx.setText((String)dlg.getResult());
  }
}
Program: 67614
Project: 67614
Buggy source:
public Image decorateImage(Image image,Object element){
  int flag=getElementFlag(element);
  if ((flag & Normal_Element) != 0) {
    return image;
  }
  DesignElementHandle handle=(DesignElementHandle)element;
  String key=handle.getElement().getDefn().getName();
  ImageDescriptor descriptor=null;
  if ((flag & Library_Element) != 0) {
    key=key + Library_Key;
    descriptor=new LibraryImageDescriptor(image,ReportPlatformUIImages.getImageDescriptor(IReportGraphicConstants.ICON_REPORT_LIBRARY_OVER));
  }
 else   if ((flag & Local_Library_Element) != 0) {
    key=key + Local_Library_Key;
    descriptor=new LibraryImageDescriptor(image,ReportPlatformUIImages.getImageDescriptor(IReportGraphicConstants.ICON_REPORT_LOCAL_LIBRARY_OVER));
  }
  ImageRegistry regiest=ReportPlugin.getDefault().getImageRegistry();
  ImageDescriptor temp=regiest.getDescriptor(key);
  if (temp != null) {
    return temp.createImage();
  }
 else   if (descriptor != null) {
    regiest.put(key,descriptor);
    return descriptor.createImage();
  }
  return image;
}

Fixed version (ground truth):
public Image decorateImage(Image image,Object element){
  int flag=getElementFlag(element);
  if ((flag & Normal_Element) != 0) {
    return image;
  }
  String key="String_Node_Str";
  if (element instanceof DesignElementHandle) {
    DesignElementHandle handle=(DesignElementHandle)element;
    key=handle.getElement().getDefn().getName();
  }
 else   if (element instanceof EmbeddedImageHandle) {
    EmbeddedImageHandle imageHandle=(EmbeddedImageHandle)element;
    key=imageHandle.getQualifiedName();
  }
  ImageDescriptor descriptor=null;
  if ((flag & Library_Element) != 0) {
    key=key + Library_Key;
    descriptor=new LibraryImageDescriptor(image,ReportPlatformUIImages.getImageDescriptor(IReportGraphicConstants.ICON_REPORT_LIBRARY_OVER));
  }
 else   if ((flag & Local_Library_Element) != 0) {
    key=key + Local_Library_Key;
    descriptor=new LibraryImageDescriptor(image,ReportPlatformUIImages.getImageDescriptor(IReportGraphicConstants.ICON_REPORT_LOCAL_LIBRARY_OVER));
  }
  ImageRegistry regiest=ReportPlugin.getDefault().getImageRegistry();
  ImageDescriptor temp=regiest.getDescriptor(key);
  if (temp != null) {
    return temp.createImage();
  }
 else   if (descriptor != null) {
    regiest.put(key,descriptor);
    return descriptor.createImage();
  }
  return image;
}
Program: 67615
Project: 67615
Buggy source:
private int getElementFlag(Object element){
  if (!(element instanceof DesignElementHandle) && !(element instanceof EmbeddedImageHandle)) {
    return Normal_Element;
  }
  DesignElementHandle handle=(DesignElementHandle)element;
  boolean isLinkEmbeddedImage=false;
  if (element instanceof EmbeddedImageHandle) {
    EmbeddedImageHandle image=(EmbeddedImageHandle)element;
    if (image.isLibReference()) {
      isLinkEmbeddedImage=true;
    }
  }
  if (DEUtil.isLinkedElement(handle) || isLinkEmbeddedImage) {
    if (handle.hasLocalProperties()) {
      return Local_Library_Element;
    }
    return Library_Element;
  }
  return Normal_Element;
}

Fixed version (ground truth):
private int getElementFlag(Object element){
  if (!(element instanceof DesignElementHandle) && !(element instanceof EmbeddedImageHandle)) {
    return Normal_Element;
  }
  if (element instanceof EmbeddedImageHandle) {
    EmbeddedImageHandle image=(EmbeddedImageHandle)element;
    if (image.isLibReference()) {
      return Library_Element;
    }
  }
 else   if (element instanceof DesignElementHandle) {
    DesignElementHandle handle=(DesignElementHandle)element;
    if (DEUtil.isLinkedElement(handle)) {
      if (handle.hasLocalProperties()) {
        return Local_Library_Element;
      }
      return Library_Element;
    }
  }
  return Normal_Element;
}
Program: 67616
Project: 67616
Buggy source:
public static double convertColWidth(int width,int dpi){
  float PX_PT=INCH_PT / dpi;
  if (width < 0)   return 0;
  double result=0;
  double widthInPixel=width / PX_PT;
  double digitalWidth=7;
  result=(int)((widthInPixel - 5) / digitalWidth * 100 + 0.5);
  double characterNumber=(double)result / 100;
  result=(int)((characterNumber * digitalWidth + 5) / digitalWidth * 256);
  return result / 256;
}

Fixed version (ground truth):
public static double convertColWidth(int width){
  float PX_PT=INCH_PT / 96;
  if (width < 0)   return 0;
  double result=0;
  double widthInPixel=width / PX_PT;
  double digitalWidth=7;
  result=(int)((widthInPixel - 5) / digitalWidth * 100 + 0.5);
  double characterNumber=(double)result / 100;
  result=(int)((characterNumber * digitalWidth + 5) / digitalWidth * 256);
  return result / 256;
}
Program: 67617
Project: 67617
Buggy source:
public String getExpectedStringFormat(){
  return Messages.getString("String_Node_Str",getULocale());
}

Fixed version (ground truth):
@Override public String getExpectedStringFormat(){
  return Messages.getString("String_Node_Str",getULocale());
}
Program: 67619
Project: 67619
Buggy source:
/** 
 * return the array of indexes, the DataDefinitions with these id could be computed with aggregation function. By default, all the indexes will be added to the array. And this method should be overridden for some special chart types, such as bubble, stock...
 * @param series
 * @return index array
 */
public int[] getDataDefIdsForGrouping(Series series){
  return new int[]{0,1};
}

Fixed version (ground truth):
/** 
 * return the array of indexes, the DataDefinitions with these id could be computed with aggregation function. By default, all the indexes will be added to the array. And this method should be overridden for some special chart types, such as bubble, stock...
 * @param series
 * @return index array
 */
@Override public int[] getDataDefIdsForGrouping(Series series){
  return new int[]{0,1};
}
Program: 67620
Project: 67620
Buggy source:
public Object getMinimum(DataSet ds) throws ChartException {
  DataSetIterator dsi=null;
  try {
    dsi=new DataSetIterator(ds);
    dsi.reset();
  }
 catch (  IllegalArgumentException uiex) {
    throw new ChartException(ChartEngineExtensionPlugin.ID,ChartException.DATA_SET,uiex);
  }
  if (dsi.size() == 0) {
    throw new ChartException(ChartEngineExtensionPlugin.ID,ChartException.DATA_SET,"String_Node_Str",Messages.getResourceBundle(getULocale()));
  }
  BubbleEntry bde;
  CDateTime cMin=null;
  double dMin=Double.MAX_VALUE;
  BigNumber bnMin=null;
  for (int i=0; dsi.hasNext(); i++) {
    bde=(BubbleEntry)dsi.next();
    if (bde != null) {
      Object oValue=bde.getValue();
      if (NumberUtil.isBigNumber(oValue)) {
        BigNumber bnValue=(BigNumber)oValue;
        bnValue=bnValue.subtract((BigNumber)bde.getSizeNumber());
        if (i == 0) {
          bnMin=bnValue;
        }
 else {
          bnMin=bnMin.min(bnValue);
        }
      }
 else       if (oValue instanceof Number) {
        double dValue=((Number)oValue).doubleValue();
        if (i == 0) {
          dMin=dValue;
        }
 else {
          dMin=Math.min(dMin,dValue);
        }
      }
 else       if (oValue instanceof CDateTime) {
        CDateTime cValue=(CDateTime)oValue;
        if (i == 0) {
          cMin=cValue;
        }
 else {
          if (cValue.before(cMin)) {
            cMin=cValue;
          }
        }
      }
    }
  }
  if (cMin == null) {
    return bnMin != null ? bnMin : new Double(dMin);
  }
  return cMin;
}

Fixed version (ground truth):
@Override public Object getMinimum(DataSet ds) throws ChartException {
  DataSetIterator dsi=null;
  try {
    dsi=new DataSetIterator(ds);
    dsi.reset();
  }
 catch (  IllegalArgumentException uiex) {
    throw new ChartException(ChartEngineExtensionPlugin.ID,ChartException.DATA_SET,uiex);
  }
  if (dsi.size() == 0) {
    throw new ChartException(ChartEngineExtensionPlugin.ID,ChartException.DATA_SET,"String_Node_Str",Messages.getResourceBundle(getULocale()));
  }
  BubbleEntry bde;
  CDateTime cMin=null;
  double dMin=Double.MAX_VALUE;
  BigNumber bnMin=null;
  for (int i=0; dsi.hasNext(); i++) {
    bde=(BubbleEntry)dsi.next();
    if (bde != null) {
      Object oValue=bde.getValue();
      if (NumberUtil.isBigNumber(oValue)) {
        BigNumber bnValue=(BigNumber)oValue;
        bnValue=bnValue.subtract((BigNumber)bde.getSizeNumber());
        if (i == 0) {
          bnMin=bnValue;
        }
 else {
          bnMin=bnMin.min(bnValue);
        }
      }
 else       if (oValue instanceof Number) {
        double dValue=((Number)oValue).doubleValue();
        if (i == 0) {
          dMin=dValue;
        }
 else {
          dMin=Math.min(dMin,dValue);
        }
      }
 else       if (oValue instanceof CDateTime) {
        CDateTime cValue=(CDateTime)oValue;
        if (i == 0) {
          cMin=cValue;
        }
 else {
          if (cValue.before(cMin)) {
            cMin=cValue;
          }
        }
      }
    }
  }
  if (cMin == null) {
    return bnMin != null ? bnMin : new Double(dMin);
  }
  return cMin;
}
Program: 67621
Project: 67621
Buggy source:
public String toString(Object[] columnData) throws ChartException {
  if (columnData == null || columnData.length == 0) {
    throw new ChartException(ChartEngineExtensionPlugin.ID,ChartException.DATA_SET,"String_Node_Str",Messages.getResourceBundle(getULocale()));
  }
  StringBuffer buffer=new StringBuffer();
  for (int i=0; i < columnData.length; i++) {
    if (columnData[i] == null) {
      throw new ChartException(ChartEngineExtensionPlugin.ID,ChartException.DATA_SET,"String_Node_Str",Messages.getResourceBundle(getULocale()));
    }
    if (columnData[i] instanceof Object[]) {
      buffer.append(toBubbleString((Object[])columnData[i]));
    }
    if (i < columnData.length - 1) {
      buffer.append("String_Node_Str");
    }
  }
  return buffer.toString();
}

Fixed version (ground truth):
@Override public String toString(Object[] columnData) throws ChartException {
  if (columnData == null || columnData.length == 0) {
    throw new ChartException(ChartEngineExtensionPlugin.ID,ChartException.DATA_SET,"String_Node_Str",Messages.getResourceBundle(getULocale()));
  }
  StringBuffer buffer=new StringBuffer();
  for (int i=0; i < columnData.length; i++) {
    if (columnData[i] == null) {
      throw new ChartException(ChartEngineExtensionPlugin.ID,ChartException.DATA_SET,"String_Node_Str",Messages.getResourceBundle(getULocale()));
    }
    if (columnData[i] instanceof Object[]) {
      buffer.append(toBubbleString((Object[])columnData[i]));
    }
    if (i < columnData.length - 1) {
      buffer.append("String_Node_Str");
    }
  }
  return buffer.toString();
}
Program: 67623
Project: 67623
Buggy source:
public Object getMaximum(DataSet ds) throws ChartException {
  DataSetIterator dsi=null;
  try {
    dsi=new DataSetIterator(ds);
    dsi.reset();
  }
 catch (  IllegalArgumentException uiex) {
    throw new ChartException(ChartEngineExtensionPlugin.ID,ChartException.DATA_SET,uiex);
  }
  if (dsi.size() == 0) {
    throw new ChartException(ChartEngineExtensionPlugin.ID,ChartException.DATA_SET,"String_Node_Str",Messages.getResourceBundle(getULocale()));
  }
  BubbleEntry bde;
  CDateTime cMax=null;
  double dMax=-Double.MAX_VALUE;
  BigNumber bnMax=null;
  for (int i=0; dsi.hasNext(); i++) {
    bde=(BubbleEntry)dsi.next();
    if (bde != null) {
      Object oValue=bde.getValue();
      if (NumberUtil.isBigNumber(oValue)) {
        BigNumber bnValue=(BigNumber)oValue;
        bnValue=bnValue.add((BigNumber)bde.getSizeNumber());
        if (i == 0) {
          bnMax=bnValue;
        }
 else {
          bnMax=bnMax.max(bnValue);
        }
      }
 else       if (oValue instanceof Number) {
        double dValue=((Number)oValue).doubleValue();
        if (i == 0) {
          dMax=dValue;
        }
 else {
          dMax=Math.max(dMax,dValue);
        }
      }
 else       if (oValue instanceof CDateTime) {
        CDateTime cValue=(CDateTime)oValue;
        if (i == 0) {
          cMax=cValue;
        }
 else {
          if (cValue.after(cMax)) {
            cMax=cValue;
          }
        }
      }
    }
  }
  if (cMax == null) {
    return bnMax != null ? bnMax : new Double(dMax);
  }
  return cMax;
}

Fixed version (ground truth):
@Override public Object getMaximum(DataSet ds) throws ChartException {
  DataSetIterator dsi=null;
  try {
    dsi=new DataSetIterator(ds);
    dsi.reset();
  }
 catch (  IllegalArgumentException uiex) {
    throw new ChartException(ChartEngineExtensionPlugin.ID,ChartException.DATA_SET,uiex);
  }
  if (dsi.size() == 0) {
    throw new ChartException(ChartEngineExtensionPlugin.ID,ChartException.DATA_SET,"String_Node_Str",Messages.getResourceBundle(getULocale()));
  }
  BubbleEntry bde;
  CDateTime cMax=null;
  double dMax=-Double.MAX_VALUE;
  BigNumber bnMax=null;
  for (int i=0; dsi.hasNext(); i++) {
    bde=(BubbleEntry)dsi.next();
    if (bde != null) {
      Object oValue=bde.getValue();
      if (NumberUtil.isBigNumber(oValue)) {
        BigNumber bnValue=(BigNumber)oValue;
        bnValue=bnValue.add((BigNumber)bde.getSizeNumber());
        if (i == 0) {
          bnMax=bnValue;
        }
 else {
          bnMax=bnMax.max(bnValue);
        }
      }
 else       if (oValue instanceof Number) {
        double dValue=((Number)oValue).doubleValue();
        if (i == 0) {
          dMax=dValue;
        }
 else {
          dMax=Math.max(dMax,dValue);
        }
      }
 else       if (oValue instanceof CDateTime) {
        CDateTime cValue=(CDateTime)oValue;
        if (i == 0) {
          cMax=cValue;
        }
 else {
          if (cValue.after(cMax)) {
            cMax=cValue;
          }
        }
      }
    }
  }
  if (cMax == null) {
    return bnMax != null ? bnMax : new Double(dMax);
  }
  return cMax;
}