nus-yam/ex-repair huggingface dataset:
Program: 68215
Project: 68215
Buggy source:
private IResultMetaData getRuntimeMetaData(DataSetHandle dataSetHandle) throws BirtException {
  QueryDefinition query=new QueryDefinition();
  query.setDataSetName(dataSetHandle.getQualifiedName());
  query.setMaxRows(1);
  query.setAutoBinding(true);
  IResultMetaData metaData=new QueryExecutionHelper(dataEngine,modelAdaptor,sessionContext,false).executeQuery(query).getResultMetaData();
  addResultSetColumn(dataSetHandle,metaData);
  if (MetaDataPopulator.needsUseResultHint(dataSetHandle,metaData)) {
    metaData=new QueryExecutionHelper(dataEngine,modelAdaptor,sessionContext,true).executeQuery(query).getResultMetaData();
  }
  return metaData;
}

Fixed version (ground truth):
private IResultMetaData getRuntimeMetaData(DataSetHandle dataSetHandle) throws BirtException {
  QueryDefinition query=new QueryDefinition();
  query.setDataSetName(dataSetHandle.getQualifiedName());
  query.setMaxRows(1);
  query.setAutoBinding(true);
  IResultMetaData metaData=new QueryExecutionHelper(dataEngine,modelAdaptor,sessionContext,false,this.session).executeQuery(query).getResultMetaData();
  addResultSetColumn(dataSetHandle,metaData);
  if (MetaDataPopulator.needsUseResultHint(dataSetHandle,metaData)) {
    metaData=new QueryExecutionHelper(dataEngine,modelAdaptor,sessionContext,true,this.session).executeQuery(query).getResultMetaData();
  }
  return metaData;
}
Program: 68217
Project: 68217
Buggy source:
/** 
 * @param dataEngine
 * @param modelAdaptor
 * @param moduleHandle
 * @param useResultHints
 */
QueryExecutionHelper(DataEngine dataEngine,IModelAdapter modelAdaptor,DataSessionContext sessionContext,boolean useResultHints){
  this.dataEngine=dataEngine;
  this.modelAdaptor=modelAdaptor;
  this.sessionContext=sessionContext;
  this.useResultHints=useResultHints;
}

Fixed version (ground truth):
/** 
 * @param dataEngine
 * @param modelAdaptor
 * @param moduleHandle
 * @param useResultHints
 */
QueryExecutionHelper(DataEngine dataEngine,IModelAdapter modelAdaptor,DataSessionContext sessionContext,boolean useResultHints,DataRequestSession session){
  this.dataEngine=dataEngine;
  this.modelAdaptor=modelAdaptor;
  this.sessionContext=sessionContext;
  this.useResultHints=useResultHints;
  this.session=session;
}
Program: 68218
Project: 68218
Buggy source:
private static Object[] populateObArray(Object obj,Object[] obArray){
  try {
    if (obj instanceof Number && !(obj instanceof BigDecimal)) {
      for (int i=0; i < obArray.length; i++) {
        obArray[i]=DataTypeUtil.toDouble(obArray[i]);
      }
    }
 else     if (obj instanceof java.sql.Date) {
      for (int i=0; i < obArray.length; i++) {
        obArray[i]=DataTypeUtil.toSqlDate(obArray[i]);
      }
    }
 else     if (obj instanceof java.sql.Time) {
      for (int i=0; i < obArray.length; i++) {
        obArray[i]=DataTypeUtil.toSqlTime(obArray[i]);
      }
    }
 else     if (obj instanceof Date) {
      for (int i=0; i < obArray.length; i++) {
        obArray[i]=DataTypeUtil.toDate(obArray[i]);
      }
    }
  }
 catch (  BirtException e) {
    try {
      makeObjectArrayStringArray(obArray);
    }
 catch (    BirtException e1) {
    }
  }
  return obArray;
}

Fixed version (ground truth):
private static Object[] populateObArray(Object obj,Object[] obArray){
  try {
    for (int i=0; i < obArray.length; i++) {
      if (obArray[i] instanceof Object[])       return obArray;
    }
    if (obj instanceof Number && !(obj instanceof BigDecimal)) {
      for (int i=0; i < obArray.length; i++) {
        obArray[i]=DataTypeUtil.toDouble(obArray[i]);
      }
    }
 else     if (obj instanceof java.sql.Date) {
      for (int i=0; i < obArray.length; i++) {
        obArray[i]=DataTypeUtil.toSqlDate(obArray[i]);
      }
    }
 else     if (obj instanceof java.sql.Time) {
      for (int i=0; i < obArray.length; i++) {
        obArray[i]=DataTypeUtil.toSqlTime(obArray[i]);
      }
    }
 else     if (obj instanceof Date) {
      for (int i=0; i < obArray.length; i++) {
        obArray[i]=DataTypeUtil.toDate(obArray[i]);
      }
    }
  }
 catch (  BirtException e) {
    try {
      makeObjectArrayStringArray(obArray);
    }
 catch (    BirtException e1) {
    }
  }
  return obArray;
}
Program: 68219
Project: 68219
Buggy source:
/** 
 * Parses out bookmark name from a url for interanl bookmark.
 * @param url the url string
 * @return the bookmark name.
 */
private String getBookmark(String url){
  int start=url.indexOf(BOOKMARK_PREFIX) + BOOKMARK_PREFIX.length();
  int end=url.length() - 2;
  return url.substring(start,end);
}

Fixed version (ground truth):
/** 
 * Parses out bookmark name from a url for interanl bookmark.
 * @param url the url string
 * @return the bookmark name.
 */
private String getBookmark(String url){
  int start=url.indexOf(BOOKMARK_URL_PREFIX);
  int end=-1;
  if (start != -1) {
    start+=BOOKMARK_URL_PREFIX.length();
    end=url.indexOf("String_Node_Str",start);
    if (end == -1) {
      end=url.length();
    }
    return url.substring(start,end);
  }
 else   if (url.startsWith(BOOKMARK_ANCHOR_PREFIX)) {
    start=BOOKMARK_ANCHOR_PREFIX.length();
    end=url.length();
    return url.substring(start,end);
  }
 else   if (url.startsWith(BOOKMARK_JAVASCRIPT_PREFIX) && url.endsWith("String_Node_Str")) {
    start=BOOKMARK_JAVASCRIPT_PREFIX.length();
    end=url.length() - 2;
    return url.substring(start,end);
  }
  return null;
}
Program: 68220
Project: 68220
Buggy source:
private void createImageMap(int[] area,IImageArea imageArea,String url,String targetWindow){
  if (url == null) {
    return;
  }
  url=url.replaceAll("String_Node_Str","String_Node_Str");
  ActionContent link=new ActionContent();
  if (isBookmark(url)) {
    String bookmark=getBookmark(url);
    link.setBookmark(bookmark);
  }
 else {
    link.setHyperlink(url,targetWindow);
  }
  area=getAbsoluteArea(area,imageArea);
  createImageMapContainer(area[0],area[1],area[2],area[3],link);
}

Fixed version (ground truth):
private void createImageMap(int[] area,IImageArea imageArea,String url,String targetWindow){
  if (url == null) {
    return;
  }
  url=url.replaceAll("String_Node_Str","String_Node_Str");
  ActionContent link=new ActionContent();
  String bookmark=getBookmark(url);
  if (bookmark != null) {
    link.setBookmark(bookmark);
  }
 else {
    link.setHyperlink(url,targetWindow);
  }
  area=getAbsoluteArea(area,imageArea);
  createImageMapContainer(area[0],area[1],area[2],area[3],link);
}
Program: 68223
Project: 68223
Buggy source:
public ImageData(IImageContent image,int styleId,int datatype,Image imageInfo,XlsContainer currentContainer,int heightDpi,int widthDpi){
  super();
  this.dataType=datatype;
  this.styleId=styleId;
  height=ExcelUtil.convertDimensionType(image.getHeight(),imageInfo.getHeight() * ExcelUtil.INCH_PT / heightDpi,heightDpi) / 1000;
  int imageWidth=(int)ExcelUtil.convertDimensionType(image.getWidth(),imageInfo.getWidth() * ExcelUtil.INCH_PT / widthDpi,widthDpi);
  width=Math.min(currentContainer.getSizeInfo().getWidth(),imageWidth);
  altText=image.getAltText();
  imageUrl=image.getURI();
  this.imageData=imageInfo.getData();
  rowSpanInDesign=0;
  this.imageInfo=imageInfo;
}

Fixed version (ground truth):
public ImageData(IImageContent image,int styleId,int datatype,Image imageInfo,XlsContainer currentContainer,int heightDpi,int widthDpi){
  super();
  this.dataType=datatype;
  this.styleId=styleId;
  height=ExcelUtil.convertDimensionType(image.getHeight(),imageInfo.getHeight() * ExcelUtil.INCH_PT / heightDpi,heightDpi) / 1000;
  imageHeight=(int)height;
  int imageWidth=(int)ExcelUtil.convertDimensionType(image.getWidth(),imageInfo.getWidth() * ExcelUtil.INCH_PT / widthDpi,widthDpi);
  width=Math.min(currentContainer.getSizeInfo().getWidth(),imageWidth);
  altText=image.getAltText();
  imageUrl=image.getURI();
  this.imageData=imageInfo.getData();
  rowSpanInDesign=0;
  this.imageInfo=imageInfo;
}
Program: 68224
Project: 68224
Buggy source:
public List<IBookmarkInfo> getBookmarkInfos(Locale locale) throws EngineException {
  ArrayList<IBookmarkInfo> results=new ArrayList<IBookmarkInfo>();
  loadCoreStreamLazily();
  if (indexReader != null) {
    try {
      List<BookmarkContent> bookmarks=indexReader.getBookmarkContents();
      if (bookmarks == null) {
        return null;
      }
      ReportDesignHandle report=this.getReportDesign();
      for (      BookmarkContent bookmark : bookmarks) {
        long designId=bookmark.getElementId();
        DesignElementHandle handle=report.getElementByID(designId);
        if (handle == null)         continue;
        String elementType=handle.getName();
        String displayName=null;
        if (handle instanceof ReportItemHandle) {
          displayName=((ReportItemHandle)handle).getBookmarkDisplayName();
        }
        if (locale != null) {
          if (handle instanceof ReportElementHandle) {
            ReportElementHandle elementHandle=(ReportElementHandle)handle;
            displayName=ModuleUtil.getExternalizedValue(elementHandle,bookmark.getBookmark(),displayName,ULocale.forLocale(locale));
          }
        }
        results.add(new BookmarkInfo(bookmark.getBookmark(),displayName,elementType));
      }
    }
 catch (    IOException ex) {
      throw new EngineException("String_Node_Str",ex);
    }
  }
  return results;
}

Fixed version (ground truth):
public List<IBookmarkInfo> getBookmarkInfos(Locale locale) throws EngineException {
  if (!isComplete()) {
    return null;
  }
  ArrayList<IBookmarkInfo> results=new ArrayList<IBookmarkInfo>();
  loadCoreStreamLazily();
  if (indexReader != null) {
    try {
      List<BookmarkContent> bookmarks=indexReader.getBookmarkContents();
      if (bookmarks == null) {
        return null;
      }
      ReportDesignHandle report=this.getReportDesign();
      for (      BookmarkContent bookmark : bookmarks) {
        long designId=bookmark.getElementId();
        DesignElementHandle handle=report.getElementByID(designId);
        if (handle == null)         continue;
        String elementType=handle.getName();
        String displayName=null;
        if (handle instanceof ReportItemHandle) {
          displayName=((ReportItemHandle)handle).getBookmarkDisplayName();
        }
        if (locale != null) {
          if (handle instanceof ReportElementHandle) {
            ReportElementHandle elementHandle=(ReportElementHandle)handle;
            displayName=ModuleUtil.getExternalizedValue(elementHandle,bookmark.getBookmark(),displayName,ULocale.forLocale(locale));
          }
        }
        results.add(new BookmarkInfo(bookmark.getBookmark(),displayName,elementType));
      }
    }
 catch (    IOException ex) {
      throw new EngineException("String_Node_Str",ex);
    }
  }
  return results;
}
Program: 68226
Project: 68226
Buggy source:
public void validateSeriesBindingType(Series series,IDataServiceProvider idsp) throws ChartException {
  Iterator iterEntries=series.getDataDefinition().iterator();
  while (iterEntries.hasNext()) {
    Query query=(Query)iterEntries.next();
    if (idsp.getDataType(query.getDefinition()) == DataType.TEXT_LITERAL) {
      throw new ChartException(ChartUIExtensionPlugin.ID,ChartException.DATA_BINDING,query.getDefinition());
    }
  }
}

Fixed version (ground truth):
public void validateSeriesBindingType(Series series,IDataServiceProvider idsp) throws ChartException {
  Iterator iterEntries=series.getDataDefinition().iterator();
  while (iterEntries.hasNext()) {
    Query query=(Query)iterEntries.next();
    if (idsp.getDataType(query.getDefinition()) == DataType.TEXT_LITERAL) {
      final ExpressionCodec codec=ChartModelHelper.instance().createExpressionCodec();
      codec.decode(query.getDefinition());
      throw new ChartException(ChartUIExtensionPlugin.ID,ChartException.DATA_BINDING,codec.getExpression());
    }
  }
}
Program: 68227
Project: 68227
Buggy source:
public void validateSeriesBindingType(Series series,IDataServiceProvider idsp) throws ChartException {
  Iterator iterEntries=series.getDataDefinition().iterator();
  while (iterEntries.hasNext()) {
    Query query=(Query)iterEntries.next();
    if (idsp.getDataType(query.getDefinition()) == DataType.TEXT_LITERAL) {
      throw new ChartException(ChartUIExtensionPlugin.ID,ChartException.DATA_BINDING,query.getDefinition());
    }
  }
}

Fixed version (ground truth):
public void validateSeriesBindingType(Series series,IDataServiceProvider idsp) throws ChartException {
  Iterator iterEntries=series.getDataDefinition().iterator();
  while (iterEntries.hasNext()) {
    Query query=(Query)iterEntries.next();
    if (idsp.getDataType(query.getDefinition()) == DataType.TEXT_LITERAL) {
      final ExpressionCodec codec=ChartModelHelper.instance().createExpressionCodec();
      codec.decode(query.getDefinition());
      throw new ChartException(ChartUIExtensionPlugin.ID,ChartException.DATA_BINDING,codec.getExpression());
    }
  }
}
Program: 68228
Project: 68228
Buggy source:
public void validateSeriesBindingType(Series series,IDataServiceProvider idsp) throws ChartException {
  List<Query> entries=series.getDataDefinition();
  if (entries.size() >= 2) {
    Query query=entries.get(1);
    DataType dataType=idsp.getDataType(query.getDefinition());
    if (dataType == DataType.TEXT_LITERAL || dataType == DataType.DATE_TIME_LITERAL) {
      throw new ChartException(ChartUIExtensionPlugin.ID,ChartException.DATA_BINDING,query.getDefinition());
    }
  }
}

Fixed version (ground truth):
public void validateSeriesBindingType(Series series,IDataServiceProvider idsp) throws ChartException {
  List<Query> entries=series.getDataDefinition();
  if (entries.size() >= 2) {
    Query query=entries.get(1);
    DataType dataType=idsp.getDataType(query.getDefinition());
    if (dataType == DataType.TEXT_LITERAL || dataType == DataType.DATE_TIME_LITERAL) {
      final ExpressionCodec codec=ChartModelHelper.instance().createExpressionCodec();
      codec.decode(query.getDefinition());
      throw new ChartException(ChartUIExtensionPlugin.ID,ChartException.DATA_BINDING,codec.getExpression());
    }
  }
}
Program: 68229
Project: 68229
Buggy source:
public void validateSeriesBindingType(Series series,IDataServiceProvider idsp) throws ChartException {
  Iterator iterEntries=series.getDataDefinition().iterator();
  while (iterEntries.hasNext()) {
    Query query=(Query)iterEntries.next();
    DataType dataType=idsp.getDataType(query.getDefinition());
    if (dataType == DataType.TEXT_LITERAL || dataType == DataType.DATE_TIME_LITERAL) {
      throw new ChartException(ChartUIExtensionPlugin.ID,ChartException.DATA_BINDING,query.getDefinition());
    }
  }
}

Fixed version (ground truth):
public void validateSeriesBindingType(Series series,IDataServiceProvider idsp) throws ChartException {
  Iterator iterEntries=series.getDataDefinition().iterator();
  while (iterEntries.hasNext()) {
    Query query=(Query)iterEntries.next();
    DataType dataType=idsp.getDataType(query.getDefinition());
    if (dataType == DataType.TEXT_LITERAL || dataType == DataType.DATE_TIME_LITERAL) {
      final ExpressionCodec codec=ChartModelHelper.instance().createExpressionCodec();
      codec.decode(query.getDefinition());
      throw new ChartException(ChartUIExtensionPlugin.ID,ChartException.DATA_BINDING,codec.getExpression());
    }
  }
}
Program: 68230
Project: 68230
Buggy source:
public void validateSeriesBindingType(Series series,IDataServiceProvider idsp) throws ChartException {
  ArrayList<Query> al=new ArrayList<Query>();
  al.addAll(series.getDataDefinition());
  for (int i=0; i < al.size(); i++) {
    Query query=al.get(i);
    DataType dataType=idsp.getDataType(query.getDefinition());
    if ((i != 2) && (dataType == DataType.TEXT_LITERAL || dataType == DataType.NUMERIC_LITERAL)) {
      throw new ChartException(ChartUIExtensionPlugin.ID,ChartException.DATA_BINDING,query.getDefinition());
    }
  }
}

Fixed version (ground truth):
public void validateSeriesBindingType(Series series,IDataServiceProvider idsp) throws ChartException {
  ArrayList<Query> al=new ArrayList<Query>();
  al.addAll(series.getDataDefinition());
  for (int i=0; i < al.size(); i++) {
    Query query=al.get(i);
    DataType dataType=idsp.getDataType(query.getDefinition());
    if ((i != 2) && (dataType == DataType.TEXT_LITERAL || dataType == DataType.NUMERIC_LITERAL)) {
      final ExpressionCodec codec=ChartModelHelper.instance().createExpressionCodec();
      codec.decode(query.getDefinition());
      throw new ChartException(ChartUIExtensionPlugin.ID,ChartException.DATA_BINDING,codec.getExpression());
    }
  }
}
Program: 68231
Project: 68231
Buggy source:
public void validateSeriesBindingType(Series series,IDataServiceProvider idsp) throws ChartException {
  Iterator iterEntries=series.getDataDefinition().iterator();
  while (iterEntries.hasNext()) {
    Query query=(Query)iterEntries.next();
    if (idsp.getDataType(query.getDefinition()) == DataType.TEXT_LITERAL) {
      throw new ChartException(ChartUIExtensionPlugin.ID,ChartException.DATA_BINDING,query.getDefinition());
    }
  }
}

Fixed version (ground truth):
public void validateSeriesBindingType(Series series,IDataServiceProvider idsp) throws ChartException {
  Iterator iterEntries=series.getDataDefinition().iterator();
  while (iterEntries.hasNext()) {
    Query query=(Query)iterEntries.next();
    if (idsp.getDataType(query.getDefinition()) == DataType.TEXT_LITERAL) {
      final ExpressionCodec codec=ChartModelHelper.instance().createExpressionCodec();
      codec.decode(query.getDefinition());
      throw new ChartException(ChartUIExtensionPlugin.ID,ChartException.DATA_BINDING,codec.getExpression());
    }
  }
}
Program: 68232
Project: 68232
Buggy source:
public void validateSeriesBindingType(Series series,IDataServiceProvider idsp) throws ChartException {
  Iterator<?> iterEntries=series.getDataDefinition().iterator();
  boolean bIsNumericAgg=ChartUIUtil.isNumericAggregate(series);
  while (iterEntries.hasNext()) {
    Query query=(Query)iterEntries.next();
    DataType dataType=idsp.getDataType(query.getDefinition());
    if (bIsNumericAgg) {
      dataType=DataType.NUMERIC_LITERAL;
    }
    if (dataType == DataType.TEXT_LITERAL || dataType == DataType.DATE_TIME_LITERAL) {
      throw new ChartException(ChartUIExtensionPlugin.ID,ChartException.DATA_BINDING,query.getDefinition());
    }
  }
}

Fixed version (ground truth):
public void validateSeriesBindingType(Series series,IDataServiceProvider idsp) throws ChartException {
  Iterator<?> iterEntries=series.getDataDefinition().iterator();
  boolean bIsNumericAgg=ChartUIUtil.isNumericAggregate(series);
  while (iterEntries.hasNext()) {
    Query query=(Query)iterEntries.next();
    DataType dataType=idsp.getDataType(query.getDefinition());
    if (bIsNumericAgg) {
      dataType=DataType.NUMERIC_LITERAL;
    }
    if (dataType == DataType.TEXT_LITERAL || dataType == DataType.DATE_TIME_LITERAL) {
      final ExpressionCodec codec=ChartModelHelper.instance().createExpressionCodec();
      codec.decode(query.getDefinition());
      throw new ChartException(ChartUIExtensionPlugin.ID,ChartException.DATA_BINDING,codec.getExpression());
    }
  }
}
Program: 68233
Project: 68233
Buggy source:
public void validateSeriesBindingType(Series series,IDataServiceProvider idsp) throws ChartException {
  Iterator<?> iterEntries=series.getDataDefinition().iterator();
  boolean bIsNumericAgg=ChartUIUtil.isNumericAggregate(series);
  while (iterEntries.hasNext()) {
    Query query=(Query)iterEntries.next();
    DataType dataType=idsp.getDataType(query.getDefinition());
    if (bIsNumericAgg) {
      dataType=DataType.NUMERIC_LITERAL;
    }
    if (dataType == DataType.TEXT_LITERAL || dataType == DataType.DATE_TIME_LITERAL) {
      throw new ChartException(ChartUIExtensionPlugin.ID,ChartException.DATA_BINDING,query.getDefinition());
    }
  }
}

Fixed version (ground truth):
public void validateSeriesBindingType(Series series,IDataServiceProvider idsp) throws ChartException {
  Iterator<?> iterEntries=series.getDataDefinition().iterator();
  boolean bIsNumericAgg=ChartUIUtil.isNumericAggregate(series);
  while (iterEntries.hasNext()) {
    Query query=(Query)iterEntries.next();
    DataType dataType=idsp.getDataType(query.getDefinition());
    if (bIsNumericAgg) {
      dataType=DataType.NUMERIC_LITERAL;
    }
    if (dataType == DataType.TEXT_LITERAL || dataType == DataType.DATE_TIME_LITERAL) {
      final ExpressionCodec codec=ChartModelHelper.instance().createExpressionCodec();
      codec.decode(query.getDefinition());
      throw new ChartException(ChartUIExtensionPlugin.ID,ChartException.DATA_BINDING,codec.getExpression());
    }
  }
}
Program: 68234
Project: 68234
Buggy source:
public void validateSeriesBindingType(Series series,IDataServiceProvider idsp) throws ChartException {
  Iterator iterEntries=series.getDataDefinition().iterator();
  while (iterEntries.hasNext()) {
    Query query=(Query)iterEntries.next();
    if (idsp.getDataType(query.getDefinition()) == DataType.TEXT_LITERAL) {
      throw new ChartException(ChartUIExtensionPlugin.ID,ChartException.DATA_BINDING,query.getDefinition());
    }
  }
}

Fixed version (ground truth):
public void validateSeriesBindingType(Series series,IDataServiceProvider idsp) throws ChartException {
  Iterator iterEntries=series.getDataDefinition().iterator();
  while (iterEntries.hasNext()) {
    Query query=(Query)iterEntries.next();
    if (idsp.getDataType(query.getDefinition()) == DataType.TEXT_LITERAL) {
      final ExpressionCodec codec=ChartModelHelper.instance().createExpressionCodec();
      codec.decode(query.getDefinition());
      throw new ChartException(ChartUIExtensionPlugin.ID,ChartException.DATA_BINDING,codec.getExpression());
    }
  }
}
Program: 68235
Project: 68235
Buggy source:
public void validateSeriesBindingType(Series series,IDataServiceProvider idsp) throws ChartException {
  Iterator iterEntries=series.getDataDefinition().iterator();
  while (iterEntries.hasNext()) {
    Query query=(Query)iterEntries.next();
    DataType dataType=idsp.getDataType(query.getDefinition());
    if (dataType == DataType.TEXT_LITERAL || dataType == DataType.DATE_TIME_LITERAL) {
      throw new ChartException(ChartUIExtensionPlugin.ID,ChartException.DATA_BINDING,query.getDefinition());
    }
  }
}

Fixed version (ground truth):
public void validateSeriesBindingType(Series series,IDataServiceProvider idsp) throws ChartException {
  Iterator iterEntries=series.getDataDefinition().iterator();
  while (iterEntries.hasNext()) {
    Query query=(Query)iterEntries.next();
    DataType dataType=idsp.getDataType(query.getDefinition());
    if (dataType == DataType.TEXT_LITERAL || dataType == DataType.DATE_TIME_LITERAL) {
      final ExpressionCodec codec=ChartModelHelper.instance().createExpressionCodec();
      codec.decode(query.getDefinition());
      throw new ChartException(ChartUIExtensionPlugin.ID,ChartException.DATA_BINDING,codec.getExpression());
    }
  }
}
Program: 68236
Project: 68236
Buggy source:
/** 
 * @param parent
 * @param style
 */
public CustomPreviewTable(Composite parent,int style){
  super(parent,SWT.BORDER);
  fHeadings=new Vector();
  columnWidths=new Vector<Integer>();
  btnHeaders=new Vector<Button>();
  vListeners=new Vector<Listener>();
  placeComponents();
  createDummyTable();
}

Fixed version (ground truth):
/** 
 * @param parent
 * @param style
 */
public CustomPreviewTable(Composite parent,int style){
  super(parent,SWT.BORDER);
  fHeadings=new Vector<ColumnBindingInfo>();
  columnWidths=new Vector<Integer>();
  btnHeaders=new Vector<Button>();
  vListeners=new Vector<Listener>();
  placeComponents();
  createDummyTable();
}
Program: 68237
Project: 68237
Buggy source:
public void setHeaderAlignment(int iAlignment){
  this.iHeaderAlignment=iAlignment;
  for (int i=0; i < btnHeaders.size(); i++) {
    ((Button)btnHeaders.get(i)).setAlignment(iHeaderAlignment);
  }
}

Fixed version (ground truth):
public void setHeaderAlignment(int iAlignment){
  this.iHeaderAlignment=iAlignment;
  for (int i=0; i < btnHeaders.size(); i++) {
    btnHeaders.get(i).setAlignment(iHeaderAlignment);
  }
}
Program: 68238
Project: 68238
Buggy source:
public String getColumnHeading(int iIndex) throws IllegalArgumentException {
  if (fHeadings == null || iIndex >= fHeadings.size()) {
    throw new IllegalArgumentException(Messages.getString("String_Node_Str",String.valueOf(iIndex)));
  }
  return (String)((ColumnBindingInfo)fHeadings.get(iIndex)).getName();
}

Fixed version (ground truth):
public String getColumnHeading(int iIndex) throws IllegalArgumentException {
  if (isDummy) {
    return "String_Node_Str";
  }
  if (fHeadings == null || iIndex >= fHeadings.size()) {
    throw new IllegalArgumentException(Messages.getString("String_Node_Str",String.valueOf(iIndex)));
  }
  return fHeadings.get(iIndex).getName();
}
Program: 68239
Project: 68239
Buggy source:
private void placeComponents(){
  if (cmpHeaders == null) {
    GridLayout glTable=new GridLayout();
    glTable.numColumns=1;
    glTable.marginWidth=1;
    glTable.marginHeight=1;
    glTable.horizontalSpacing=0;
    glTable.verticalSpacing=0;
    setLayout(glTable);
    cmpHeaders=new Composite(this,SWT.NONE);
    GridData gdCmpHeaders=new GridData(GridData.FILL_HORIZONTAL);
    cmpHeaders.setLayoutData(gdCmpHeaders);
    FormLayout glHeaders=new FormLayout();
    glHeaders.marginHeight=0;
    glHeaders.marginWidth=0;
    cmpHeaders.setLayout(glHeaders);
    cmpHeaders.addMouseListener(this);
  }
 else {
    Control[] buttons=cmpHeaders.getChildren();
    for (int i=0; i < buttons.length; i++) {
      buttons[i].dispose();
    }
  }
  btnHeaders.clear();
  for (int i=0; i < fHeadings.size(); i++) {
    if (fHeadings.elementAt(i) instanceof ColumnBindingInfo) {
      addHeaderButton(iHeaderAlignment,(ColumnBindingInfo)fHeadings.elementAt(i),columnWidths.get(i),i);
    }
 else {
      addHeaderButton(iHeaderAlignment,(String)fHeadings.elementAt(i),columnWidths.get(i));
    }
  }
  cmpHeaders.layout();
  if (cnvCells != null && !cnvCells.isDisposed()) {
    cnvCells.dispose();
  }
  cnvCells=new TableCanvas(this,SWT.NONE,fHeadings.size(),new Color[]{},this);
  cnvCells.setLayoutData(new GridData(GridData.FILL_BOTH));
  cnvCells.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_LIST_BACKGROUND));
  cnvCells.addMouseMoveListener(this);
  getShell().addControlListener(this);
  addDisposeListener(this);
}

Fixed version (ground truth):
private void placeComponents(){
  if (cmpHeaders == null) {
    GridLayout glTable=new GridLayout();
    glTable.numColumns=1;
    glTable.marginWidth=1;
    glTable.marginHeight=1;
    glTable.horizontalSpacing=0;
    glTable.verticalSpacing=0;
    setLayout(glTable);
    cmpHeaders=new Composite(this,SWT.NONE);
    GridData gdCmpHeaders=new GridData(GridData.FILL_HORIZONTAL);
    cmpHeaders.setLayoutData(gdCmpHeaders);
    FormLayout glHeaders=new FormLayout();
    glHeaders.marginHeight=0;
    glHeaders.marginWidth=0;
    cmpHeaders.setLayout(glHeaders);
    cmpHeaders.addMouseListener(this);
  }
 else {
    Control[] buttons=cmpHeaders.getChildren();
    for (int i=0; i < buttons.length; i++) {
      buttons[i].dispose();
    }
  }
  btnHeaders.clear();
  if (isDummy) {
    for (int i=0; i < columnWidths.size(); i++) {
      addHeaderButton(iHeaderAlignment,"String_Node_Str",columnWidths.get(i));
    }
  }
 else {
    for (int i=0; i < fHeadings.size(); i++) {
      addHeaderButton(iHeaderAlignment,fHeadings.elementAt(i),columnWidths.get(i),i);
    }
  }
  cmpHeaders.layout();
  if (cnvCells != null && !cnvCells.isDisposed()) {
    cnvCells.dispose();
  }
  cnvCells=new TableCanvas(this,SWT.NONE,fHeadings.size(),new Color[]{},this);
  cnvCells.setLayoutData(new GridData(GridData.FILL_BOTH));
  cnvCells.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_LIST_BACKGROUND));
  cnvCells.addMouseMoveListener(this);
  getShell().addControlListener(this);
  addDisposeListener(this);
}
Program: 68240
Project: 68240
Buggy source:
private int getMaxTableWidth(){
  int max=0;
  for (int i=0; i < columnWidths.size(); i++) {
    max+=((Integer)columnWidths.get(i)).intValue();
  }
  return max;
}

Fixed version (ground truth):
private int getMaxTableWidth(){
  int max=0;
  for (int i=0; i < columnWidths.size(); i++) {
    max+=columnWidths.get(i).intValue();
  }
  return max;
}
Program: 68241
Project: 68241
Buggy source:
public void setColumns(String[] headers,int[] widths){
  clearContents();
  if (headers.length == 0) {
    createDummyTable();
    return;
  }
  for (int i=0; i < headers.length; i++) {
    fHeadings.add(headers[i]);
    columnWidths.add(Integer.valueOf(widths[i]));
  }
  placeComponents();
}

Fixed version (ground truth):
public void setColumns(ColumnBindingInfo[] headers){
  clearContents();
  if (headers.length == 0) {
    createDummyTable();
    return;
  }
  isDummy=false;
  int iW=cnvCells.getVisibleTableWidth() / headers.length;
  if (iW < TableCanvas.SCROLL_HORIZONTAL_STEP) {
    iW=TableCanvas.SCROLL_HORIZONTAL_STEP;
  }
  for (int i=0; i < headers.length; i++) {
    fHeadings.add(headers[i]);
    columnWidths.add(Integer.valueOf(iW));
  }
  placeComponents();
}
Program: 68242
Project: 68242
Buggy source:
/** 
 * Returns head object of current column, if it is sharing query, the head object should be instance of <code>ColumnBindingInfo</code>, else it is String object.
 * @return
 * @since 2.3
 */
public Object getCurrentColumnHeadObject(){
  return (iColumnIndex != -1) ? fHeadings.get(iColumnIndex) : null;
}

Fixed version (ground truth):
/** 
 * Returns head object of current column, if it is sharing query, the head object should be instance of <code>ColumnBindingInfo</code>, else it is String object.
 * @return column head object
 * @since 2.3
 */
public Object getCurrentColumnHeadObject(){
  return (iColumnIndex != -1) ? fHeadings.get(iColumnIndex) : null;
}
Program: 68243
Project: 68243
Buggy source:
public void createDummyTable(){
  setColumns(new String[]{"String_Node_Str","String_Node_Str","String_Node_Str"},new int[]{200,200,200});
  layout(true);
  WizardBase.removeException();
}

Fixed version (ground truth):
public void createDummyTable(){
  isDummy=true;
  for (int i=0; i < 3; i++) {
    columnWidths.add(Integer.valueOf(200));
  }
  placeComponents();
  layout(true);
  WizardBase.removeException();
}
Program: 68244
Project: 68244
Buggy source:
/** 
 * Returns the column heading of the column that the user right-clicked on last. null if user hasn't right-clicked in the table yet. This method is for use to determine the column for which the popup-menu is to be displayed...since the menu is handled externally.
 * @return the last column in which the user has right-clicked.
 */
public String getCurrentColumnHeading(){
  return (iColumnIndex != -1) ? (String)((ColumnBindingInfo)fHeadings.get(iColumnIndex)).getName() : null;
}

Fixed version (ground truth):
/** 
 * Returns the column heading of the column that the user right-clicked on last. null if user hasn't right-clicked in the table yet. This method is for use to determine the column for which the popup-menu is to be displayed...since the menu is handled externally.
 * @return the last column in which the user has right-clicked.
 */
public String getCurrentColumnHeading(){
  return (iColumnIndex != -1) ? fHeadings.get(iColumnIndex).getName() : null;
}
Program: 68245
Project: 68245
Buggy source:
public List<IBookmarkInfo> getBookmarkInfos(Locale locale) throws EngineException {
  if (!isComplete()) {
    return null;
  }
  ArrayList<IBookmarkInfo> results=new ArrayList<IBookmarkInfo>();
  loadCoreStreamLazily();
  if (indexReader != null) {
    try {
      List<BookmarkContent> bookmarks=indexReader.getBookmarkContents();
      if (bookmarks == null) {
        return null;
      }
      ReportDesignHandle report=this.getReportDesign();
      for (      BookmarkContent bookmark : bookmarks) {
        long designId=bookmark.getElementId();
        DesignElementHandle handle=report.getElementByID(designId);
        if (handle == null)         continue;
        String elementType=handle.getName();
        String displayName=null;
        if (handle instanceof ReportItemHandle) {
          displayName=((ReportItemHandle)handle).getBookmarkDisplayName();
        }
        if (locale != null) {
          if (handle instanceof ReportElementHandle) {
            ReportElementHandle elementHandle=(ReportElementHandle)handle;
            displayName=ModuleUtil.getExternalizedValue(elementHandle,bookmark.getBookmark(),displayName,ULocale.forLocale(locale));
          }
        }
        results.add(new BookmarkInfo(bookmark.getBookmark(),displayName,elementType));
      }
    }
 catch (    IOException ex) {
      throw new EngineException("String_Node_Str",ex);
    }
  }
  return results;
}

Fixed version (ground truth):
public List<IBookmarkInfo> getBookmarkInfos(Locale locale) throws EngineException {
  if (!isComplete()) {
    return null;
  }
  ArrayList<IBookmarkInfo> results=new ArrayList<IBookmarkInfo>();
  loadCoreStreamLazily();
  if (indexReader != null) {
    try {
      List<BookmarkContent> bookmarks=indexReader.getBookmarkContents();
      if (bookmarks == null) {
        return null;
      }
      ReportDesignHandle report=this.getReportDesign();
      for (      BookmarkContent bookmark : bookmarks) {
        long designId=bookmark.getElementId();
        DesignElementHandle handle=report.getElementByID(designId);
        if (handle == null)         continue;
        String elementType=handle.getDefn().getName();
        String displayName=null;
        if (handle instanceof ReportItemHandle) {
          displayName=((ReportItemHandle)handle).getBookmarkDisplayName();
        }
        if (locale != null) {
          if (handle instanceof ReportElementHandle) {
            ReportElementHandle elementHandle=(ReportElementHandle)handle;
            displayName=ModuleUtil.getExternalizedValue(elementHandle,bookmark.getBookmark(),displayName,ULocale.forLocale(locale));
          }
        }
        results.add(new BookmarkInfo(bookmark.getBookmark(),displayName,elementType));
      }
    }
 catch (    IOException ex) {
      throw new EngineException("String_Node_Str",ex);
    }
  }
  return results;
}
Program: 68246
Project: 68246
Buggy source:
public SplitResult split(int height,boolean force) throws BirtException {
  assert(height < this.height);
  LineArea result=null;
  Iterator iter=children.iterator();
  while (iter.hasNext()) {
    ContainerArea child=(ContainerArea)iter.next();
    if (iter.hasNext()) {
      if (child.getX() < height) {
        continue;
      }
 else {
        if (child.getMinYPosition() <= height) {
          iter.remove();
          if (result == null) {
            result=cloneArea();
          }
          result.addChild(child);
          child.setParent(result);
        }
 else {
          SplitResult splitChild=child.split(height - child.getY(),force);
          ContainerArea splitChildArea=splitChild.getResult();
          if (splitChildArea != null) {
            if (result == null) {
              result=cloneArea();
            }
            result.addChild(splitChildArea);
            splitChildArea.setParent(result);
          }
        }
      }
    }
 else {
      break;
    }
  }
  if (result != null) {
    int h=0;
    iter=result.getChildren();
    while (iter.hasNext()) {
      ContainerArea child=(ContainerArea)iter.next();
      h=Math.max(h,child.getAllocatedHeight());
    }
    result.setHeight(h);
  }
  if (children.size() > 0) {
    int h=0;
    iter=getChildren();
    while (iter.hasNext()) {
      ContainerArea child=(ContainerArea)iter.next();
      h=Math.max(h,child.getAllocatedHeight());
    }
    setHeight(h);
  }
  if (result != null) {
    return new SplitResult(result,SplitResult.SPLIT_SUCCEED_WITH_PART);
  }
 else {
    return SplitResult.SUCCEED_WITH_NULL;
  }
}

Fixed version (ground truth):
public SplitResult split(int height,boolean force) throws BirtException {
  assert(height < this.height);
  LineArea result=null;
  Iterator iter=children.iterator();
  while (iter.hasNext()) {
    ContainerArea child=(ContainerArea)iter.next();
    if (child.getMinYPosition() <= height) {
      iter.remove();
      if (result == null) {
        result=cloneArea();
      }
      result.addChild(child);
      child.setParent(result);
    }
 else {
      SplitResult splitChild=child.split(height - child.getY(),force);
      ContainerArea splitChildArea=splitChild.getResult();
      if (splitChildArea != null) {
        if (result == null) {
          result=cloneArea();
        }
        result.addChild(splitChildArea);
        splitChildArea.setParent(result);
      }
    }
  }
  if (result != null) {
    int h=0;
    iter=result.getChildren();
    while (iter.hasNext()) {
      ContainerArea child=(ContainerArea)iter.next();
      h=Math.max(h,child.getAllocatedHeight());
    }
    result.setHeight(h);
  }
  if (children.size() > 0) {
    int h=0;
    iter=getChildren();
    while (iter.hasNext()) {
      ContainerArea child=(ContainerArea)iter.next();
      h=Math.max(h,child.getAllocatedHeight());
    }
    setHeight(h);
  }
  if (result != null) {
    return new SplitResult(result,SplitResult.SPLIT_SUCCEED_WITH_PART);
  }
 else {
    return SplitResult.SUCCEED_WITH_NULL;
  }
}
Program: 68247
Project: 68247
Buggy source:
private DataSetParameter getStructure(Object structureOrHandle){
  DataSetParameter structure=null;
  if (structureOrHandle instanceof DataSetParameter) {
    structure=(DataSetParameter)structureOrHandle;
  }
 else {
    structure=(DataSetParameter)((DataSetParameterHandle)structureOrHandle).getStructure();
  }
  return structure;
}

Fixed version (ground truth):
protected DataSetParameter getStructure(Object structureOrHandle){
  DataSetParameter structure=null;
  if (structureOrHandle instanceof DataSetParameter) {
    structure=(DataSetParameter)structureOrHandle;
  }
 else {
    structure=(DataSetParameter)((DataSetParameterHandle)structureOrHandle).getStructure();
  }
  return structure;
}
Program: 68248
Project: 68248
Buggy source:
private void refreshMessage(){
  getContainer().setMessage(DEFAULT_MESSAGE,IMessageProvider.NONE);
  if (!doSaveEmptyParameter(parameters)) {
    getContainer().setMessage(Messages.getFormattedString("String_Node_Str",new Object[]{this.getNoneValuedParameterName()}),IMessageProvider.ERROR);
  }
}

Fixed version (ground truth):
protected void refreshMessage(){
  getContainer().setMessage(DEFAULT_MESSAGE,IMessageProvider.NONE);
  if (!doSaveEmptyParameter(parameters)) {
    getContainer().setMessage(Messages.getFormattedString("String_Node_Str",new Object[]{this.getNoneValuedParameterName()}),IMessageProvider.ERROR);
  }
}
Program: 68249
Project: 68249
Buggy source:
private void doEdit(Object structureOrHandle){
  ParameterInputDialog dlg=new ParameterInputDialog(structureOrHandle,isOdaDataSetHandle);
  if (dlg.open() == Window.OK) {
    viewer.getViewer().refresh();
    refreshMessage();
    refreshLinkedReportParamStatus();
  }
}

Fixed version (ground truth):
protected void doEdit(Object structureOrHandle){
  ParameterInputDialog dlg=new ParameterInputDialog(structureOrHandle,isOdaDataSetHandle);
  if (dlg.open() == Window.OK) {
    viewer.getViewer().refresh();
    refreshMessage();
    refreshLinkedReportParamStatus();
  }
}
Program: 68250
Project: 68250
Buggy source:
private void refreshLinkedReportParamStatus(){
  TableItem items[]=viewer.getViewer().getTable().getItems();
  for (int i=0; i < items.length; i++) {
    if (items[i].getData() instanceof OdaDataSetParameterHandle) {
      OdaDataSetParameterHandle handle=(OdaDataSetParameterHandle)items[i].getData();
      if (handle.getParamName() == null) {
        continue;
      }
      ScalarParameterHandle reportParam=ParameterPageUtil.getScalarParameter(handle.getParamName(),true);
      if (reportParam != null) {
        if (DesignChoiceConstants.SCALAR_PARAM_TYPE_MULTI_VALUE.equals(reportParam.getParamType())) {
          getContainer().setMessage(Messages.getFormattedString("String_Node_Str",new Object[]{handle.getParamName(),handle.getName()}),IMessageProvider.ERROR);
        }
      }
 else {
        getContainer().setMessage(Messages.getFormattedString("String_Node_Str",new Object[]{handle.getParamName()}),IMessageProvider.ERROR);
      }
      viewer.getViewer().refresh();
    }
  }
}

Fixed version (ground truth):
protected void refreshLinkedReportParamStatus(){
  TableItem items[]=viewer.getViewer().getTable().getItems();
  for (int i=0; i < items.length; i++) {
    if (items[i].getData() instanceof OdaDataSetParameterHandle) {
      OdaDataSetParameterHandle handle=(OdaDataSetParameterHandle)items[i].getData();
      if (handle.getParamName() == null) {
        continue;
      }
      ScalarParameterHandle reportParam=ParameterPageUtil.getScalarParameter(handle.getParamName(),true);
      if (reportParam != null) {
        if (DesignChoiceConstants.SCALAR_PARAM_TYPE_MULTI_VALUE.equals(reportParam.getParamType())) {
          getContainer().setMessage(Messages.getFormattedString("String_Node_Str",new Object[]{handle.getParamName(),handle.getName()}),IMessageProvider.ERROR);
        }
      }
 else {
        getContainer().setMessage(Messages.getFormattedString("String_Node_Str",new Object[]{handle.getParamName(),handle.getName()}),IMessageProvider.ERROR);
      }
      viewer.getViewer().refresh();
    }
  }
}
Program: 68251
Project: 68251
Buggy source:
/** 
 * get the right direction for different dataset type
 * @return
 */
private String[] getDirections(){
  String[] directions;
  boolean supportInput=((DataSetEditor)this.getContainer()).supportsInParameters();
  boolean supportOutput=((DataSetEditor)this.getContainer()).supportsOutputParameters();
  if (supportInput && supportOutput) {
    directions=new String[]{Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str")};
  }
 else   if (supportInput) {
    directions=new String[]{Messages.getString("String_Node_Str")};
  }
 else   if (supportOutput) {
    directions=new String[]{Messages.getString("String_Node_Str")};
  }
 else {
    directions=new String[]{Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str")};
  }
  return directions;
}

Fixed version (ground truth):
/** 
 * get the right direction for different dataset type
 * @return
 */
protected String[] getDirections(){
  String[] directions;
  boolean supportInput=((DataSetEditor)this.getContainer()).supportsInParameters();
  boolean supportOutput=((DataSetEditor)this.getContainer()).supportsOutputParameters();
  if (supportInput && supportOutput) {
    directions=new String[]{Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str")};
  }
 else   if (supportInput) {
    directions=new String[]{Messages.getString("String_Node_Str")};
  }
 else   if (supportOutput) {
    directions=new String[]{Messages.getString("String_Node_Str")};
  }
 else {
    directions=new String[]{Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str"),Messages.getString("String_Node_Str")};
  }
  return directions;
}
Program: 68254
Project: 68254
Buggy source:
public void run(){
  if (eb != null) {
    eb.setBindingName(bindingName,true);
  }
}

Fixed version (ground truth):
public void run(){
  if (eb != null) {
    eb.setBindingName(bindingName,true);
  }
 else {
    exprCodec.setBindingName(bindingName,isCubeMode());
    query.setDefinition(exprCodec.encode());
    ColorPalette.getInstance().putColor(bindingName);
    updateColorAndText();
  }
}
Program: 68255
Project: 68255
Buggy source:
public void menuAboutToShow(IMenuManager manager){
  if (data instanceof ColumnBindingInfo) {
    addMenu(manager,new HeaderShowAction(((ColumnBindingInfo)data).getName()));
    List<Object> actions=getActionsForTableHead(((ColumnBindingInfo)data).getName());
    for (    Object act : actions) {
      addMenu(manager,act);
    }
  }
 else   if (data instanceof Integer) {
    addMenu(manager,new HeaderShowAction(tablePreview.getCurrentColumnHeading()));
    String expr=ExpressionUtil.createJSRowExpression(tablePreview.getCurrentColumnHeading());
    List<Object> actions=getActionsForTableHead(expr);
    for (    Object act : actions) {
      addMenu(manager,act);
    }
  }
 else   if (data instanceof MeasureHandle) {
    String expr=createCubeExpression();
    if (expr != null) {
      addMenu(manager,getMenuForMeasure(getChartModel(),expr));
    }
  }
 else   if (data instanceof LevelHandle) {
    String expr=createCubeExpression();
    if (expr != null) {
      addMenu(manager,getMenuForDimension(getChartModel(),expr));
    }
  }
}

Fixed version (ground truth):
public void menuAboutToShow(IMenuManager manager){
  if (data instanceof ColumnBindingInfo) {
    addMenu(manager,new HeaderShowAction(((ColumnBindingInfo)data).getName()));
    List<Object> actions=getActionsForTableHead(((ColumnBindingInfo)data).getName());
    for (    Object act : actions) {
      addMenu(manager,act);
    }
  }
 else   if (data instanceof Integer) {
    addMenu(manager,new HeaderShowAction(tablePreview.getCurrentColumnHeading()));
    String expr=tablePreview.getCurrentColumnHeading();
    List<Object> actions=getActionsForTableHead(expr);
    for (    Object act : actions) {
      addMenu(manager,act);
    }
  }
 else   if (data instanceof MeasureHandle) {
    String expr=createCubeExpression();
    if (expr != null) {
      addMenu(manager,getMenuForMeasure(getChartModel(),expr));
    }
  }
 else   if (data instanceof LevelHandle) {
    String expr=createCubeExpression();
    if (expr != null) {
      addMenu(manager,getMenuForDimension(getChartModel(),expr));
    }
  }
}
Program: 68257
Project: 68257
Buggy source:
ValueYSeriesAction(Query query,String bindingName){
  super(getOrthogonalSeriesTitle(getChartModel()));
  this.bindingName=bindingName;
  this.eb=DataDefinitionTextManager.getInstance().findExpressionButton(query);
  boolean enabled=eb != null;
  if (dataProvider.isSharedBinding() || dataProvider.isInheritColumnsGroups()) {
    Object obj=getCurrentColumnHeadObject();
    if (obj instanceof ColumnBindingInfo && ((ColumnBindingInfo)obj).getColumnType() == ColumnBindingInfo.GROUP_COLUMN) {
      enabled=false;
    }
  }
  setEnabled(enabled);
}

Fixed version (ground truth):
ValueYSeriesAction(Query query,String bindingName){
  super(getOrthogonalSeriesTitle(getChartModel()));
  this.bindingName=bindingName;
  this.eb=DataDefinitionTextManager.getInstance().findExpressionButton(query);
  this.query=query;
  boolean enabled=true;
  if (dataProvider.isSharedBinding() || dataProvider.isInheritColumnsGroups()) {
    Object obj=getCurrentColumnHeadObject();
    if (obj instanceof ColumnBindingInfo && ((ColumnBindingInfo)obj).getColumnType() == ColumnBindingInfo.GROUP_COLUMN) {
      enabled=false;
    }
  }
  setEnabled(enabled);
}