nus-yam/ex-repair huggingface dataset:
Program: 67747
Project: 67747
Buggy source:
public void setProperty(String sProperty,Object oValue){
  super.setProperty(sProperty,oValue);
  if (sProperty.equals(IDeviceRenderer.UPDATE_NOTIFIER)) {
    _iun=(IUpdateNotifier)oValue;
    ivRenderer.setIUpdateNotifier(_iun);
  }
 else   if (sProperty.equals(IDeviceRenderer.EXPECTED_BOUNDS)) {
    final Bounds bo=(Bounds)oValue;
    try {
      dom=createSvgDocument(bo.getWidth(),bo.getHeight());
      svggc=new SVGGraphics2D(dom,_enableScript);
      ivRenderer.setSVG2D(svggc);
      ivRenderer.createHotspotLayer(dom);
      super.setProperty(IDeviceRenderer.GRAPHICS_CONTEXT,svggc);
    }
 catch (    Exception e) {
      e.printStackTrace();
    }
  }
 else   if (sProperty.equals(IDeviceRenderer.FILE_IDENTIFIER)) {
    oOutputIdentifier=oValue;
  }
 else   if (sProperty.equals(ISVGConstants.JAVASCRIPT_CODE_LIST)) {
    scriptCodeList=(List<String>)oValue;
  }
 else   if (sProperty.equals(ISVGConstants.JAVASCRIPT_URL_REF_LIST)) {
    scriptRefList=(List<String>)oValue;
  }
 else   if (sProperty.equals(ISVGConstants.RESIZE_SVG)) {
    _resizeSVG=((Boolean)oValue).booleanValue();
  }
 else   if (sProperty.equals(ISVGConstants.ENABLE_SCRIPT)) {
    _enableScript=((Boolean)oValue).booleanValue();
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") @Override public void setProperty(String sProperty,Object oValue){
  super.setProperty(sProperty,oValue);
  if (sProperty.equals(IDeviceRenderer.UPDATE_NOTIFIER)) {
    _iun=(IUpdateNotifier)oValue;
    ivRenderer.setIUpdateNotifier(_iun);
  }
 else   if (sProperty.equals(IDeviceRenderer.EXPECTED_BOUNDS)) {
    final Bounds bo=(Bounds)oValue;
    try {
      dom=createSvgDocument(bo.getWidth(),bo.getHeight());
      svggc=new SVGGraphics2D(dom,_enableScript);
      ivRenderer.setSVG2D(svggc);
      ivRenderer.createHotspotLayer(dom);
      super.setProperty(IDeviceRenderer.GRAPHICS_CONTEXT,svggc);
    }
 catch (    Exception e) {
      e.printStackTrace();
    }
  }
 else   if (sProperty.equals(IDeviceRenderer.FILE_IDENTIFIER)) {
    oOutputIdentifier=oValue;
  }
 else   if (sProperty.equals(ISVGConstants.JAVASCRIPT_CODE_LIST)) {
    scriptCodeList=(List<String>)oValue;
  }
 else   if (sProperty.equals(ISVGConstants.JAVASCRIPT_URL_REF_LIST)) {
    scriptRefList=(List<String>)oValue;
  }
 else   if (sProperty.equals(ISVGConstants.RESIZE_SVG)) {
    _resizeSVG=((Boolean)oValue).booleanValue();
  }
 else   if (sProperty.equals(ISVGConstants.ENABLE_SCRIPT)) {
    _enableScript=((Boolean)oValue).booleanValue();
  }
}
Program: 67748
Project: 67748
Buggy source:
public void fillOval(OvalRenderEvent ore) throws ChartException {
  ivRenderer.groupPrimitive(ore,false);
  super.fillOval(ore);
  ivRenderer.ungroupPrimitive(ore,false);
}

Fixed version (ground truth):
@Override public void fillOval(OvalRenderEvent ore) throws ChartException {
  ivRenderer.groupPrimitive(ore,false);
  super.fillOval(ore);
  ivRenderer.ungroupPrimitive(ore,false);
}
Program: 67749
Project: 67749
Buggy source:
public void fillRectangle(RectangleRenderEvent rre) throws ChartException {
  ivRenderer.groupPrimitive(rre,false);
  super.fillRectangle(rre);
  ivRenderer.ungroupPrimitive(rre,false);
}

Fixed version (ground truth):
@Override public void fillRectangle(RectangleRenderEvent rre) throws ChartException {
  ivRenderer.groupPrimitive(rre,false);
  super.fillRectangle(rre);
  ivRenderer.ungroupPrimitive(rre,false);
}
Program: 67750
Project: 67750
Buggy source:
public void drawPolygon(PolygonRenderEvent pre) throws ChartException {
  ivRenderer.groupPrimitive(pre,false);
  super.drawPolygon(pre);
  ivRenderer.ungroupPrimitive(pre,false);
}

Fixed version (ground truth):
@Override public void drawPolygon(PolygonRenderEvent pre) throws ChartException {
  ivRenderer.groupPrimitive(pre,false);
  super.drawPolygon(pre);
  ivRenderer.ungroupPrimitive(pre,false);
}
Program: 67753
Project: 67753
Buggy source:
private void selectDataSet(){
  String currentDS=getDataServiceProvider().getDataSet();
  if (currentDS == null) {
    cmbDataItems.select(0);
    currentData=null;
  }
 else {
    ChartUIUtil.setText(cmbDataItems,currentDS);
    currentData=currentDS;
  }
}

Fixed version (ground truth):
private void selectDataSet(){
  String currentDS=getDataServiceProvider().getDataSet();
  if (currentDS == null) {
    cmbDataItems.select(0);
    currentData=null;
  }
 else {
    cmbDataItems.setText(currentDS);
    currentData=currentDS;
  }
}
Program: 67761
Project: 67761
Buggy source:
public void testMirrorOnQuarterDimension() throws DataException {
  ICubeQueryDefinition cqd=createMirroredQueryDefinition("String_Node_Str");
  BirtCubeView cubeView=new BirtCubeView(new CubeQueryExecutor(null,cqd,de.getSession(),this.scope,de.getContext()));
  CubeCursor dataCursor=cubeView.getCubeCursor(new StopSign(),cube,false);
  List rowEdgeBindingNames=new ArrayList();
  rowEdgeBindingNames.add("String_Node_Str");
  rowEdgeBindingNames.add("String_Node_Str");
  rowEdgeBindingNames.add("String_Node_Str");
  rowEdgeBindingNames.add("String_Node_Str");
  List columnEdgeBindingNames=new ArrayList();
  columnEdgeBindingNames.add("String_Node_Str");
  List measureBindingNames=new ArrayList();
  measureBindingNames.add("String_Node_Str");
  try {
    testOut.print(new CubeUtility().printCubeAlongEdge(dataCursor,columnEdgeBindingNames,rowEdgeBindingNames,measureBindingNames,null,null,null,null));
    this.checkOutputFile();
  }
 catch (  Exception e) {
    fail("String_Node_Str");
  }
}

Fixed version (ground truth):
public void testMirrorOnQuarterDimension() throws DataException {
  ICubeQueryDefinition cqd=createMirroredQueryDefinition("String_Node_Str");
  BirtCubeView cubeView=new BirtCubeView(new CubeQueryExecutor(null,cqd,de.getSession(),this.scope,de.getContext()),cube,null);
  CubeCursor dataCursor=cubeView.getCubeCursor(new StopSign(),cube,false);
  List rowEdgeBindingNames=new ArrayList();
  rowEdgeBindingNames.add("String_Node_Str");
  rowEdgeBindingNames.add("String_Node_Str");
  rowEdgeBindingNames.add("String_Node_Str");
  rowEdgeBindingNames.add("String_Node_Str");
  List columnEdgeBindingNames=new ArrayList();
  columnEdgeBindingNames.add("String_Node_Str");
  List measureBindingNames=new ArrayList();
  measureBindingNames.add("String_Node_Str");
  try {
    testOut.print(new CubeUtility().printCubeAlongEdge(dataCursor,columnEdgeBindingNames,rowEdgeBindingNames,measureBindingNames,null,null,null,null));
    this.checkOutputFile();
  }
 catch (  Exception e) {
    fail("String_Node_Str");
  }
}
Program: 67762
Project: 67762
Buggy source:
public void testMirrorOnYearDimension() throws DataException {
  ICubeQueryDefinition cqd=createMirroredQueryDefinition("String_Node_Str");
  BirtCubeView cubeView=new BirtCubeView(new CubeQueryExecutor(null,cqd,de.getSession(),this.scope,de.getContext()));
  CubeCursor dataCursor=cubeView.getCubeCursor(new StopSign(),cube,false);
  List rowEdgeBindingNames=new ArrayList();
  rowEdgeBindingNames.add("String_Node_Str");
  rowEdgeBindingNames.add("String_Node_Str");
  rowEdgeBindingNames.add("String_Node_Str");
  rowEdgeBindingNames.add("String_Node_Str");
  List columnEdgeBindingNames=new ArrayList();
  columnEdgeBindingNames.add("String_Node_Str");
  List measureBindingNames=new ArrayList();
  measureBindingNames.add("String_Node_Str");
  try {
    testOut.print(new CubeUtility().printCubeAlongEdge(dataCursor,columnEdgeBindingNames,rowEdgeBindingNames,measureBindingNames,null,null,null,null));
    this.checkOutputFile();
  }
 catch (  Exception e) {
    fail("String_Node_Str");
  }
}

Fixed version (ground truth):
public void testMirrorOnYearDimension() throws DataException {
  ICubeQueryDefinition cqd=createMirroredQueryDefinition("String_Node_Str");
  BirtCubeView cubeView=new BirtCubeView(new CubeQueryExecutor(null,cqd,de.getSession(),this.scope,de.getContext()),cube,null);
  CubeCursor dataCursor=cubeView.getCubeCursor(new StopSign(),cube,false);
  List rowEdgeBindingNames=new ArrayList();
  rowEdgeBindingNames.add("String_Node_Str");
  rowEdgeBindingNames.add("String_Node_Str");
  rowEdgeBindingNames.add("String_Node_Str");
  rowEdgeBindingNames.add("String_Node_Str");
  List columnEdgeBindingNames=new ArrayList();
  columnEdgeBindingNames.add("String_Node_Str");
  List measureBindingNames=new ArrayList();
  measureBindingNames.add("String_Node_Str");
  try {
    testOut.print(new CubeUtility().printCubeAlongEdge(dataCursor,columnEdgeBindingNames,rowEdgeBindingNames,measureBindingNames,null,null,null,null));
    this.checkOutputFile();
  }
 catch (  Exception e) {
    fail("String_Node_Str");
  }
}
Program: 67763
Project: 67763
Buggy source:
public void testMirrorOnMonthDimension() throws DataException {
  ICubeQueryDefinition cqd=createMirroredQueryDefinition("String_Node_Str");
  BirtCubeView cubeView=new BirtCubeView(new CubeQueryExecutor(null,cqd,de.getSession(),this.scope,de.getContext()));
  CubeCursor dataCursor=cubeView.getCubeCursor(new StopSign(),cube,false);
  List rowEdgeBindingNames=new ArrayList();
  rowEdgeBindingNames.add("String_Node_Str");
  rowEdgeBindingNames.add("String_Node_Str");
  rowEdgeBindingNames.add("String_Node_Str");
  rowEdgeBindingNames.add("String_Node_Str");
  List columnEdgeBindingNames=new ArrayList();
  columnEdgeBindingNames.add("String_Node_Str");
  List measureBindingNames=new ArrayList();
  measureBindingNames.add("String_Node_Str");
  try {
    testOut.print(new CubeUtility().printCubeAlongEdge(dataCursor,columnEdgeBindingNames,rowEdgeBindingNames,measureBindingNames,null,null,null,null));
    this.checkOutputFile();
  }
 catch (  Exception e) {
    fail("String_Node_Str");
  }
}

Fixed version (ground truth):
public void testMirrorOnMonthDimension() throws DataException {
  ICubeQueryDefinition cqd=createMirroredQueryDefinition("String_Node_Str");
  BirtCubeView cubeView=new BirtCubeView(new CubeQueryExecutor(null,cqd,de.getSession(),this.scope,de.getContext()),cube,null);
  CubeCursor dataCursor=cubeView.getCubeCursor(new StopSign(),cube,false);
  List rowEdgeBindingNames=new ArrayList();
  rowEdgeBindingNames.add("String_Node_Str");
  rowEdgeBindingNames.add("String_Node_Str");
  rowEdgeBindingNames.add("String_Node_Str");
  rowEdgeBindingNames.add("String_Node_Str");
  List columnEdgeBindingNames=new ArrayList();
  columnEdgeBindingNames.add("String_Node_Str");
  List measureBindingNames=new ArrayList();
  measureBindingNames.add("String_Node_Str");
  try {
    testOut.print(new CubeUtility().printCubeAlongEdge(dataCursor,columnEdgeBindingNames,rowEdgeBindingNames,measureBindingNames,null,null,null,null));
    this.checkOutputFile();
  }
 catch (  Exception e) {
    fail("String_Node_Str");
  }
}
Program: 67764
Project: 67764
Buggy source:
public String getName() throws OLAPException {
  return null;
}

Fixed version (ground truth):
public String getName() throws OLAPException {
  return this.name;
}
Program: 67765
Project: 67765
Buggy source:
public void setName(String value) throws OLAPException {
}

Fixed version (ground truth):
public void setName(String value) throws OLAPException {
  this.name=value;
}
Program: 67766
Project: 67766
Buggy source:
public MirroredAggregationResultSet(IAggregationResultSet rs,int mirrorLevel,boolean breakHierarchy,List sortList) throws IOException {
  this.mirrorLevel=mirrorLevel;
  this.breakHierarchy=breakHierarchy;
  Member member=new Member();
  member.setKeyValues(new Object[]{"String_Node_Str"});
  this.rootNode=new MemberTreeNode(member);
  this.resultObject=new Object[rs.getLevelCount()];
  this.rs=rs;
  this.sortList=sortList;
  this.isTimeMirror=TimeMemberUtil.containsTimeMirror(rs,mirrorLevel);
  if (!isTimeMirror && breakHierarchy) {
    this.breakHierarchyList=new ArrayList[rs.getLevelCount() - mirrorLevel];
    for (int j=0; j < breakHierarchyList.length; j++) {
      breakHierarchyList[j]=new ArrayList();
    }
    populateMirror();
  }
 else {
    if (!isTimeMirror && !breakHierarchy) {
      this.mirrorLevel=this.mirrorLevel - 1;
    }
    populateTimeMirror();
    nodeLength=getLength(this.rootNode);
    valueMapLength=0;
    Iterator iter=this.noBreakHierarchyKeyMap.entrySet().iterator();
    while (iter.hasNext()) {
      valueMapLength+=getLength((MemberTreeNode)((Entry)iter.next()).getValue());
    }
    this.length=nodeLength * valueMapLength;
  }
}

Fixed version (ground truth):
public MirroredAggregationResultSet(IAggregationResultSet rs,RowDataAccessorService service,List sortList) throws IOException {
  this.mirrorLevel=service.getMirrorStartPosition();
  this.breakHierarchy=service.isBreakHierarchy();
  this.service=service;
  Member member=new Member();
  member.setKeyValues(new Object[]{"String_Node_Str"});
  this.rootNode=new MemberTreeNode(member);
  this.resultObject=new Object[rs.getLevelCount()];
  this.rs=rs;
  this.sortList=sortList;
  this.isTimeMirror=TimeMemberUtil.containsTimeMirror(rs,service);
  if (!isTimeMirror && breakHierarchy) {
    this.breakHierarchyList=new ArrayList[rs.getLevelCount() - mirrorLevel];
    for (int j=0; j < breakHierarchyList.length; j++) {
      breakHierarchyList[j]=new ArrayList();
    }
    populateMirror();
  }
 else {
    if (!isTimeMirror && !breakHierarchy) {
      this.mirrorLevel=this.mirrorLevel - 1;
    }
    populateTimeMirror();
    nodeLength=getLength(this.rootNode);
    valueMapLength=0;
    Iterator iter=this.noBreakHierarchyKeyMap.entrySet().iterator();
    while (iter.hasNext()) {
      valueMapLength+=getLength((MemberTreeNode)((Entry)iter.next()).getValue());
    }
    this.length=nodeLength * valueMapLength;
  }
}
Program: 67769
Project: 67769
Buggy source:
private static boolean isTimeMirrorAttributes(String attrName){
  String types=getTimeType(attrName);
  if (types == null || types.equals(DATE_TIME_LEVEL_TYPE_WEEK_OF_MONTH) || types.equals(DATE_TIME_LEVEL_TYPE_WEEK_OF_YEAR) || types.equals(DATE_TIME_LEVEL_TYPE_YEAR)) {
    return false;
  }
  return true;
}

Fixed version (ground truth):
private static boolean isTimeMirrorAttributes(String types){
  if (types == null || types.equals(DATE_TIME_LEVEL_TYPE_WEEK_OF_MONTH) || types.equals(DATE_TIME_LEVEL_TYPE_WEEK_OF_YEAR) || types.equals(DATE_TIME_LEVEL_TYPE_YEAR)) {
    return false;
  }
  return true;
}
Program: 67770
Project: 67770
Buggy source:
public static boolean isTimeMirror(IAggregationResultSet rs,int index){
  for (int i=index; i < rs.getLevelCount(); i++) {
    if (rs.getLevelAttributes(i) == null || !isTimeMirrorAttributes(rs.getLevelAttributes(i)[0]))     return false;
  }
  return true;
}

Fixed version (ground truth):
public static boolean isTimeMirror(IAggregationResultSet rs,int index,RowDataAccessorService service){
  for (int i=index; i < rs.getLevelCount(); i++) {
    if (rs.getLevelAttributes(i) == null || !isTimeMirrorAttributes(service.getLevelType(rs.getLevel(i))))     return false;
  }
  return true;
}
Program: 67771
Project: 67771
Buggy source:
public static boolean containsTimeMirror(IAggregationResultSet rs,int index){
  for (int i=index; i < rs.getLevelCount(); i++) {
    if (isTimeMirror(rs,i))     return true;
  }
  return false;
}

Fixed version (ground truth):
public static boolean containsTimeMirror(IAggregationResultSet rs,RowDataAccessorService service){
  int index=service.getMirrorStartPosition();
  for (int i=index; i < rs.getLevelCount(); i++) {
    if (isTimeMirror(rs,i,service))     return true;
  }
  return false;
}
Program: 67775
Project: 67775
Buggy source:
protected Control createDialogArea(Composite parent){
  Composite composite=(Composite)super.createDialogArea(parent);
  GridLayout layout=new GridLayout(3,false);
  layout.marginHeight=10;
  layout.marginWidth=10;
  composite.setLayout(layout);
  createCustomControls(composite);
  validateSyntax();
  addListeners();
  Utility.setSystemHelp(composite,IHelpConstants.CONEXT_ID_PROPERTYHANDLE_DIALOG);
  return composite;
}

Fixed version (ground truth):
protected Control createDialogArea(Composite parent){
  Composite composite=(Composite)super.createDialogArea(parent);
  GridLayout layout=new GridLayout(3,false);
  layout.marginHeight=10;
  layout.marginWidth=10;
  composite.setLayout(layout);
  createCustomControls(composite);
  validateSyntax();
  addListeners();
  setSystemHelp(composite);
  return composite;
}
Program: 67777
Project: 67777
Buggy source:
public void mouseDoubleClick(MouseEvent e){
  String text=getTextToInsert();
  if (text.length() > 0) {
    insertText(text);
  }
}

Fixed version (ground truth):
public void mouseDoubleClick(MouseEvent e){
  insertTreeItemText();
}
Program: 67779
Project: 67779
Buggy source:
/** 
 * The constructor.
 * @param _render
 * @param _oSource
 * @param _lo
 * @param _la
 * @param _paletteEntry
 * @param _m
 * @param _markerSize Null means auto size
 * @param _dc
 * @param _bDeferred
 * @param _bTransposed
 */
public MarkerRenderer(IDeviceRenderer _render,Object _oSource,Location _lo,LineAttributes _la,Fill _paletteEntry,Marker _m,Integer _markerSize,DeferredCache _dc,boolean _bDeferred,boolean _bTransposed){
  this.iRender=_render;
  la=goFactory.copyOf(_la);
  dc=_dc;
  bDeferred=_bDeferred;
  oSource=_oSource;
  m=_m;
  bTransposed=_bTransposed;
  if (_m.getOutline() != null) {
    la.setVisible(_m.getOutline().isVisible());
  }
  iSize=_markerSize == null ? _m.getSize() : _markerSize.intValue();
  paletteEntry=ChartUtil.convertFill(_paletteEntry,iSize,goFactory.TRANSPARENT());
  if (paletteEntry instanceof ColorDefinition && ChartUtil.isColorTransparent((ColorDefinition)paletteEntry) && (!_la.isVisible() || ChartUtil.isColorTransparent(_la.getColor()))) {
    paletteEntry=goFactory.createColorDefinition(0,0,0,15);
  }
  iSize=Math.abs(iSize) * iRender.getDisplayServer().getDpiResolution() / 72d;
  bRendering3D=_lo instanceof Location3D;
  if (bRendering3D) {
    lo3d=(Location3D)_lo;
  }
 else {
    lo=_lo;
  }
}

Fixed version (ground truth):
/** 
 * The constructor.
 * @param _render
 * @param _oSource
 * @param _lo
 * @param _la
 * @param _paletteEntry
 * @param _m
 * @param _markerSize Null means auto size
 * @param _dc
 * @param _bDeferred
 * @param _bTransposed
 */
public MarkerRenderer(IDeviceRenderer _render,Object _oSource,Location _lo,LineAttributes _la,Fill _paletteEntry,Marker _m,Integer _markerSize,DeferredCache _dc,boolean _bDeferred,boolean _bTransposed){
  this.iRender=_render;
  la=goFactory.copyOf(_la);
  dc=_dc;
  bDeferred=_bDeferred;
  oSource=_oSource;
  m=_m;
  bTransposed=_bTransposed;
  if (_m.getOutline() != null) {
    la.setVisible(_m.getOutline().isVisible());
  }
  iSize=_markerSize == null ? _m.getSize() : _markerSize.intValue();
  paletteEntry=FillUtil.convertFill(_paletteEntry,iSize,goFactory.TRANSPARENT());
  if (paletteEntry instanceof ColorDefinition && ChartUtil.isColorTransparent((ColorDefinition)paletteEntry) && (!_la.isVisible() || ChartUtil.isColorTransparent(_la.getColor()))) {
    paletteEntry=goFactory.createColorDefinition(0,0,0,15);
  }
  iSize=Math.abs(iSize) * iRender.getDisplayServer().getDpiResolution() / 72d;
  bRendering3D=_lo instanceof Location3D;
  if (bRendering3D) {
    lo3d=(Location3D)_lo;
  }
 else {
    lo=_lo;
  }
}
Program: 67782
Project: 67782
Buggy source:
public Control createContents(Composite parent){
  Composite composite=new Composite(parent,SWT.NONE);
  GridLayout layout=new GridLayout();
  layout.numColumns=2;
  composite.setLayout(layout);
  Label label=new Label(composite,SWT.NONE);
  label.setText(Messages.getString("String_Node_Str"));
  combo=new Combo(composite,SWT.BORDER | SWT.READ_ONLY);
  combo.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
  combo.setItems(getSimilarDataSources());
  selectCurrentDataSource();
  ((DataSetHandle)this.getContainer().getModel()).addListener(this);
  return composite;
}

Fixed version (ground truth):
public Control createContents(Composite parent){
  Composite composite=new Composite(parent,SWT.NONE);
  GridLayout layout=new GridLayout();
  layout.numColumns=2;
  composite.setLayout(layout);
  Label label=new Label(composite,SWT.NONE);
  label.setText(Messages.getString("String_Node_Str"));
  combo=new Combo(composite,SWT.BORDER | SWT.READ_ONLY);
  combo.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
  combo.setItems(getSimilarDataSources());
  combo.setVisibleItemCount(30);
  selectCurrentDataSource();
  ((DataSetHandle)this.getContainer().getModel()).addListener(this);
  return composite;
}
Program: 67785
Project: 67785
Buggy source:
public void close() throws BirtException {
  if (odiResult == null)   return;
  this.resultService.getSession().getEngine().removeListener(listener);
  if (this.getRdSaveHelper().needsSaveToDoc()) {
    while (this.next())     ;
    this.getRdSaveHelper().doSaveFinish();
  }
  if (needCache() && !this.isEmpty()) {
    while (this.next())     ;
    closeCacheOutputStream();
  }
  if (odiResult != null)   odiResult.close();
  odiResult=null;
  resultService=null;
  logger.logp(Level.FINE,ResultIterator.class.getName(),"String_Node_Str","String_Node_Str");
}

Fixed version (ground truth):
public void close() throws BirtException {
  if (odiResult == null)   return;
  this.resultService.getSession().getEngine().removeListener(listener);
  if (!stopSign.isStopped()) {
    if (this.getRdSaveHelper().needsSaveToDoc()) {
      while (this.next())       ;
      this.getRdSaveHelper().doSaveFinish();
    }
    if (needCache() && !this.isEmpty()) {
      while (this.next())       ;
      closeCacheOutputStream();
    }
  }
  if (odiResult != null)   odiResult.close();
  odiResult=null;
  resultService=null;
  logger.logp(Level.FINE,ResultIterator.class.getName(),"String_Node_Str","String_Node_Str");
}
Program: 67787
Project: 67787
Buggy source:
@Override protected boolean doAction() throws Exception {
  ReportDesignHandle designHandle=(ReportDesignHandle)SessionHandleAdapter.getInstance().getReportDesignHandle();
  VariableElementHandle variable=(VariableElementHandle)ElementProcessorFactory.createProcessor(ReportDesignConstants.VARIABLE_ELEMENT).createElement(null);
  VariableDialog dialog=new VariableDialog(Messages.getString("String_Node_Str"),designHandle,variable);
  if (dialog.open() == Dialog.OK)   designHandle.getPropertyHandle(IReportDesignModel.PAGE_VARIABLES_PROP).add(variable);
  return true;
}

Fixed version (ground truth):
@Override protected boolean doAction() throws Exception {
  isDone=false;
  ReportDesignHandle designHandle=(ReportDesignHandle)SessionHandleAdapter.getInstance().getReportDesignHandle();
  VariableElementHandle variable=(VariableElementHandle)ElementProcessorFactory.createProcessor(ReportDesignConstants.VARIABLE_ELEMENT).createElement(null);
  VariableDialog dialog=new VariableDialog(Messages.getString("String_Node_Str"),designHandle,variable);
  if (dialog.open() == Dialog.OK)   designHandle.getPropertyHandle(IReportDesignModel.PAGE_VARIABLES_PROP).add(variable);
  isDone=true;
  createElement=variable;
  return true;
}
Program: 67789
Project: 67789
Buggy source:
/** 
 * Fill gradient.
 * @param gc
 */
protected void fillGradient(GC gc){
  idr.setProperty(IDeviceRenderer.GRAPHICS_CONTEXT,gc);
  PolygonRenderEvent event=new PolygonRenderEvent(this);
  Location[] la=LocationImpl.create(new double[]{2,2,this.getSize().x - 2,this.getSize().x - 2},new double[]{2,this.getSize().y - 2,this.getSize().y - 2,2});
  event.setPoints(la);
  event.setBackground(fCurrent);
  try {
    idr.fillPolygon(event);
  }
 catch (  ChartException e) {
  }
}

Fixed version (ground truth):
/** 
 * Fill gradient.
 * @param gc
 */
protected void fillGradient(GC gc){
  Location[] la=LocationImpl.create(new double[]{2,2,this.getSize().x - 2,this.getSize().x - 2},new double[]{2,this.getSize().y - 2,this.getSize().y - 2,2});
  fillPolygonWithIdr(gc,fCurrent,la);
}
Program: 67790
Project: 67790
Buggy source:
public void setEnabled(boolean bState){
  super.setEnabled(bState);
  redraw();
}

Fixed version (ground truth):
@Override public void setEnabled(boolean bState){
  super.setEnabled(bState);
  redraw();
}
Program: 67791
Project: 67791
Buggy source:
/** 
 * @param stopSign
 * @throws DataException
 */
private void populateResultSet() throws DataException {
  List aggCCList=prepareComputedColumns(TransformationConstants.RESULT_SET_MODEL);
  doRowFiltering();
  populateTempComputedColumns(this.getAggrComputedColumns(aggCCList,false));
  List aggrDefns=this.populator.getEventHandler().getAggrDefinitions();
  prepareAggregations(aggrDefns);
  doGroupFiltering();
  doAggrRowFiltering();
  doRowSorting();
  doGroupSorting();
  if (!groupingDone) {
    PassUtil.pass(this.populator,new OdiResultSetWrapper(populator.getResultIterator()),true);
    groupingDone=true;
  }
  clearTemporaryComputedColumns(iccState);
}

Fixed version (ground truth):
/** 
 * @param stopSign
 * @throws DataException
 */
private void populateResultSet() throws DataException {
  List aggCCList=prepareComputedColumns(TransformationConstants.RESULT_SET_MODEL);
  doRowFiltering();
  populateTempComputedColumns(this.getAggrComputedColumns(aggCCList,false));
  List aggrDefns=this.populator.getEventHandler().getAggrDefinitions();
  prepareAggregations(aggrDefns);
  doGroupFiltering();
  if (needDoGroupFiltering() && psController.needDoOperation(PassStatusController.AGGR_ROW_FILTERING))   prepareAggregations(aggrDefns);
  doAggrRowFiltering();
  doRowSorting();
  doGroupSorting();
  if (!groupingDone) {
    PassUtil.pass(this.populator,new OdiResultSetWrapper(populator.getResultIterator()),true);
    groupingDone=true;
  }
  clearTemporaryComputedColumns(iccState);
}
Program: 67792
Project: 67792
Buggy source:
@SuppressWarnings("String_Node_Str") private void handleCell(CrosstabCellHandle cell,String emptyVlaue) throws BirtException {
  if (cell == null) {
    return;
  }
  if (handler != null) {
    ICrosstabCell cellItem=new CrosstabCellImpl(cell);
    handler.callFunction(CrosstabScriptHandler.ON_PREPARE_CELL,cellItem,context);
  }
  for (Iterator itr=cell.getContents().iterator(); itr.hasNext(); ) {
    ReportElementHandle handle=(ReportElementHandle)itr.next();
    context.prepare(handle);
    if (emptyVlaue != null && handle instanceof DataItemHandle) {
      DataItemHandle dataHandle=(DataItemHandle)handle;
      MapRule rule=StructureFactory.createMapRule();
      rule.setTestExpression(ExpressionUtil.createJSDataExpression(dataHandle.getResultSetColumn()));
      rule.setOperator(DesignChoiceConstants.MAP_OPERATOR_NULL);
      rule.setDisplay(emptyVlaue);
      PropertyHandle mapHandle=dataHandle.getPropertyHandle(StyleHandle.MAP_RULES_PROP);
      try {
        mapHandle.addItem(rule);
      }
 catch (      SemanticException e) {
        logger.log(Level.SEVERE,Messages.getString("String_Node_Str"),e);
      }
    }
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") private void handleCell(CrosstabCellHandle cell,String emptyVlaue) throws BirtException {
  if (cell == null) {
    return;
  }
  if (handler != null) {
    ICrosstabCell cellItem=new CrosstabCellImpl(cell);
    handler.callFunction(CrosstabScriptHandler.ON_PREPARE_CELL,cellItem,context);
  }
  for (Iterator itr=cell.getContents().iterator(); itr.hasNext(); ) {
    ReportElementHandle handle=(ReportElementHandle)itr.next();
    context.prepare(handle);
    if (handle instanceof DataItemHandle) {
      DataItemHandle dataHandle=(DataItemHandle)handle;
      MapRule rule=StructureFactory.createMapRule();
      rule.setTestExpression(ExpressionUtil.createJSDataExpression(dataHandle.getResultSetColumn()));
      rule.setOperator(DesignChoiceConstants.MAP_OPERATOR_NULL);
      rule.setDisplay(emptyVlaue);
      PropertyHandle mapHandle=dataHandle.getPropertyHandle(StyleHandle.MAP_RULES_PROP);
      try {
        mapHandle.addItem(rule);
      }
 catch (      SemanticException e) {
        logger.log(Level.SEVERE,Messages.getString("String_Node_Str"),e);
      }
    }
  }
}
Program: 67794
Project: 67794
Buggy source:
/** 
 * Updates AutoScale by checking min or max
 * @param sc
 * @param oMinimum
 * @param oMaximum
 * @param rtc
 * @param ax
 * @throws ChartException
 */
public static void setNumberMinMaxToScale(AutoScale sc,Object oMinimum,Object oMaximum,final RunTimeContext rtc,final OneAxis ax) throws ChartException {
  if (oMinimum != null) {
    if (oMinimum instanceof NumberDataElement) {
      sc.setMinimum(new Double(((NumberDataElement)oMinimum).getValue()));
    }
 else {
      throw new ChartException(ChartEnginePlugin.ID,ChartException.GENERATION,"String_Node_Str",new Object[]{oMinimum,ax.getModelAxis().getType().getName()},Messages.getResourceBundle(rtc.getULocale()));
    }
    sc.info.bMinimumFixed(true);
  }
  if (oMaximum != null) {
    if (oMaximum instanceof NumberDataElement) {
      sc.setMaximum(Double.valueOf(((NumberDataElement)oMaximum).getValue()));
    }
 else {
      throw new ChartException(ChartEnginePlugin.ID,ChartException.GENERATION,"String_Node_Str",new Object[]{oMaximum,ax.getModelAxis().getType().getName()},Messages.getResourceBundle(rtc.getULocale()));
    }
    sc.info.bMaximumFixed(true);
  }
  if (sc.info.bMaximumFixed && sc.info.bMinimumFixed) {
    if (((Double)sc.getMinimum()).doubleValue() > ((Double)sc.getMaximum()).doubleValue()) {
      throw new ChartException(ChartEnginePlugin.ID,ChartException.GENERATION,"String_Node_Str",new Object[]{sc.getMinimum(),sc.getMaximum()},Messages.getResourceBundle(rtc.getULocale()));
    }
  }
}

Fixed version (ground truth):
/** 
 * Updates AutoScale by checking min or max
 * @param sc
 * @param oMinimum
 * @param oMaximum
 * @param rtc
 * @param ax
 * @throws ChartException
 */
public static void setNumberMinMaxToScale(AutoScale sc,Object oMinimum,Object oMaximum,final RunTimeContext rtc,final OneAxis ax) throws ChartException {
  if (oMinimum instanceof NumberDataElement) {
    sc.setMinimum(new Double(((NumberDataElement)oMinimum).getValue()));
    sc.info.bMinimumFixed(true);
  }
  if (oMaximum instanceof NumberDataElement) {
    sc.setMaximum(Double.valueOf(((NumberDataElement)oMaximum).getValue()));
    sc.info.bMaximumFixed(true);
  }
  if (sc.info.bMaximumFixed && sc.info.bMinimumFixed) {
    if (((Double)sc.getMinimum()).doubleValue() > ((Double)sc.getMaximum()).doubleValue()) {
      throw new ChartException(ChartEnginePlugin.ID,ChartException.GENERATION,"String_Node_Str",new Object[]{sc.getMinimum(),sc.getMaximum()},Messages.getResourceBundle(rtc.getULocale()));
    }
  }
}
Program: 67795
Project: 67795
Buggy source:
public final Object clone(){
  final AutoScale sc=new AutoScale(info);
  sc.context=context.copy();
  sc.dStart=dStart;
  sc.dEnd=dEnd;
  sc.dStartShift=dStartShift;
  sc.dEndShift=dEndShift;
  sc.atcTickCoordinates=atcTickCoordinates;
  sc.labelVisHelper=labelVisHelper;
  sc.staggeredHelper=staggeredHelper;
  sc.hmComputedLabelText=sc.hmComputedLabelText;
  sc.tmpSC=tmpSC;
  return sc;
}

Fixed version (ground truth):
@Override public final Object clone(){
  final AutoScale sc=new AutoScale(info);
  sc.context=context.copy();
  sc.dStart=dStart;
  sc.dEnd=dEnd;
  sc.dStartShift=dStartShift;
  sc.dEndShift=dEndShift;
  sc.atcTickCoordinates=atcTickCoordinates;
  sc.labelVisHelper=labelVisHelper;
  sc.staggeredHelper=staggeredHelper;
  sc.hmComputedLabelText=sc.hmComputedLabelText;
  sc.tmpSC=tmpSC;
  return sc;
}
Program: 67797
Project: 67797
Buggy source:
private void createSelectionArea(Composite parent){
  Composite composite=new Composite(parent,SWT.NONE);
  composite.setLayout(new GridLayout(2,false));
  composite.setLayoutData(new GridData(GridData.FILL_BOTH));
  Label label=new Label(composite,SWT.NONE);
  label.setText(Messages.getString("String_Node_Str"));
  label.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_BEGINNING));
  Composite selectionArea=new Composite(composite,SWT.NONE);
  selectionArea.setLayout(new FillLayout(SWT.VERTICAL));
  uri=new Button(selectionArea,SWT.RADIO);
  uri.setText(Messages.getString("String_Node_Str"));
  uri.addSelectionListener(new SelectionAdapter(){
    public void widgetSelected(    SelectionEvent e){
      selectedType=URI_TYPE;
      title.setText(Messages.getString("String_Node_Str"));
      updateButtons();
    }
  }
);
  embedded=new Button(selectionArea,SWT.RADIO);
  embedded.setText(Messages.getString("String_Node_Str"));
  embedded.addSelectionListener(new SelectionAdapter(){
    public void widgetSelected(    SelectionEvent e){
      selectedType=EMBEDDED_TYPE;
      title.setText(Messages.getString("String_Node_Str"));
      updateButtons();
    }
  }
);
}

Fixed version (ground truth):
private void createSelectionArea(Composite parent){
  Composite composite=new Composite(parent,SWT.NONE);
  composite.setLayout(new GridLayout(2,false));
  composite.setLayoutData(new GridData(GridData.FILL_BOTH));
  Label label=new Label(composite,SWT.NONE);
  label.setText(Messages.getString("String_Node_Str"));
  label.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_BEGINNING));
  Composite selectionArea=new Composite(composite,SWT.NONE);
  selectionArea.setLayout(new FillLayout(SWT.VERTICAL));
  uri=new Button(selectionArea,SWT.RADIO);
  uri.setText(Messages.getString("String_Node_Str"));
  uri.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      selectedType=URI_TYPE;
      title.setText(Messages.getString("String_Node_Str"));
      updateButtons();
    }
  }
);
  embedded=new Button(selectionArea,SWT.RADIO);
  embedded.setText(Messages.getString("String_Node_Str"));
  embedded.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      selectedType=EMBEDDED_TYPE;
      title.setText(Messages.getString("String_Node_Str"));
      updateButtons();
    }
  }
);
}
Program: 67798
Project: 67798
Buggy source:
public void widgetSelected(SelectionEvent e){
  preview(removeQuote(uriEditor.getText()));
}

Fixed version (ground truth):
@Override public void widgetSelected(SelectionEvent e){
  preview(removeQuote(uriEditor.getText()));
}
Program: 67799
Project: 67799
Buggy source:
protected Control createDialogArea(Composite parent){
  Composite topCompostie=(Composite)super.createDialogArea(parent);
  createSelectionArea(topCompostie);
  new Label(topCompostie,SWT.SEPARATOR | SWT.HORIZONTAL).setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
  Composite composite=new Composite(topCompostie,SWT.NONE);
  composite.setLayout(new GridLayout(2,false));
  createInputArea(composite);
  createPreviewArea(composite);
  new Label(topCompostie,SWT.SEPARATOR | SWT.HORIZONTAL).setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
  return topCompostie;
}

Fixed version (ground truth):
@Override protected Control createDialogArea(Composite parent){
  Composite topCompostie=(Composite)super.createDialogArea(parent);
  createSelectionArea(topCompostie);
  new Label(topCompostie,SWT.SEPARATOR | SWT.HORIZONTAL).setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
  Composite composite=new Composite(topCompostie,SWT.NONE);
  composite.setLayout(new GridLayout(2,false));
  createInputArea(composite);
  createPreviewArea(composite);
  new Label(topCompostie,SWT.SEPARATOR | SWT.HORIZONTAL).setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
  return topCompostie;
}
Program: 67800
Project: 67800
Buggy source:
protected void okPressed(){
switch (selectedType) {
case URI_TYPE:
    fCurrent=ImageImpl.create(removeQuote(uriEditor.getText().trim()));
  break;
case EMBEDDED_TYPE:
BufferedInputStream bis=null;
try {
fCurrent=EmbeddedImageImpl.create(new File(uriEditor.getText().trim()).getName(),imageData);
bis=new BufferedInputStream(new URL(uriEditor.getText().trim()).openStream());
ByteArrayOutputStream bos=new ByteArrayOutputStream();
byte[] buf=new byte[1024];
int count=bis.read(buf);
while (count != -1) {
  bos.write(buf,0,count);
  count=bis.read(buf);
}
String data=new String(Base64.encodeBase64(bos.toByteArray()));
((EmbeddedImage)fCurrent).setData(data);
}
 catch (Exception e) {
WizardBase.displayException(e);
}
 finally {
if (bis != null) {
  try {
    bis.close();
  }
 catch (  IOException e) {
    WizardBase.displayException(e);
  }
}
}
break;
}
super.okPressed();
}

Fixed version (ground truth):
@Override protected void okPressed(){
switch (selectedType) {
case URI_TYPE:
    fCurrent=ImageImpl.create(removeQuote(uriEditor.getText().trim()));
  break;
case EMBEDDED_TYPE:
BufferedInputStream bis=null;
try {
fCurrent=EmbeddedImageImpl.create(new File(uriEditor.getText().trim()).getName(),imageData);
bis=new BufferedInputStream(new URL(uriEditor.getText().trim()).openStream());
ByteArrayOutputStream bos=new ByteArrayOutputStream();
byte[] buf=new byte[1024];
int count=bis.read(buf);
while (count != -1) {
  bos.write(buf,0,count);
  count=bis.read(buf);
}
String data=new String(Base64.encodeBase64(bos.toByteArray()));
((EmbeddedImage)fCurrent).setData(data);
}
 catch (Exception e) {
WizardBase.displayException(e);
}
 finally {
if (bis != null) {
  try {
    bis.close();
  }
 catch (  IOException e) {
    WizardBase.displayException(e);
  }
}
}
break;
}
super.okPressed();
}
Program: 67801
Project: 67801
Buggy source:
private void initURIEditor(){
  String uri="String_Node_Str";
  if (fCurrent instanceof Image) {
    uri=((Image)fCurrent).getURL();
    if (fCurrent instanceof EmbeddedImage) {
      imageData=((EmbeddedImage)fCurrent).getData();
    }
  }
  uriEditor.setText(uri);
  uriEditor.setFocus();
  clearPreview();
}

Fixed version (ground truth):
private void initURIEditor(){
  String uri="String_Node_Str";
  if (fCurrent instanceof Image && !(fCurrent instanceof PatternImage)) {
    uri=((Image)fCurrent).getURL();
    if (fCurrent instanceof EmbeddedImage) {
      imageData=((EmbeddedImage)fCurrent).getData();
    }
  }
  uriEditor.setText(uri);
  uriEditor.setFocus();
  clearPreview();
}
Program: 67802
Project: 67802
Buggy source:
protected Control createContents(Composite parent){
  Control ct=super.createContents(parent);
  ChartUIUtil.bindHelp(parent,ChartHelpContextIds.DIALOG_COLOR_IMAGE);
  initDialog();
  return ct;
}

Fixed version (ground truth):
@Override protected Control createContents(Composite parent){
  Control ct=super.createContents(parent);
  ChartUIUtil.bindHelp(parent,ChartHelpContextIds.DIALOG_COLOR_IMAGE);
  initDialog();
  return ct;
}
Program: 67804
Project: 67804
Buggy source:
public int read(int src,byte b[],int off,int len) throws IOException {
  assert(b != null);
  assert(off + len < b.length);
  for (int i=0; i < len; i++) {
    b[off + i]=0;
  }
  return len;
}

Fixed version (ground truth):
public int read(int src,byte b[],int off,int len) throws IOException {
  assert(b != null);
  assert(off + len <= b.length);
  for (int i=0; i < len; i++) {
    b[off + i]=0;
  }
  return len;
}
Program: 67805
Project: 67805
Buggy source:
public Object invoke(Command command,Object... inData) throws ChartException {
  Object outData=null;
switch (command) {
case EXPRESS_BUTTON_CREATE:
    final Control control=(Control)inData[1];
  IExpressionButton ceb=new IExpressionButton(){
    public void setExpression(    String expr){
      ChartUIUtil.setText(control,expr);
    }
    public void setEnabled(    boolean bEnabled){
      control.setEnabled(bEnabled);
    }
    public boolean isEnabled(){
      return control.isEnabled();
    }
    public String getExpression(){
      return ChartUIUtil.getText(control);
    }
    public String getDisplayExpression(){
      return getExpression();
    }
    public void addListener(    Listener listener){
    }
    public void setAccessor(    EAttributeAccessor<String> accessor){
    }
    public String getExpressionType(){
      return null;
    }
    public boolean isCube(){
      return false;
    }
    public void setBindingName(    String bindingName,    boolean bNotifyEvents){
    }
    public void setExpression(    String expr,    boolean bNotifyEvents){
    }
    public void setAssitField(    IAssistField assistField){
    }
    public void setPredefinedQuery(    Object[] predefinedQuery){
    }
  }
;
outData=ceb;
break;
}
return outData;
}

Fixed version (ground truth):
public Object invoke(Command command,Object... inData) throws ChartException {
  Object outData=null;
switch (command) {
case EXPRESS_BUTTON_CREATE:
    final Control control=(Control)inData[1];
  new Label((Composite)inData[0],SWT.NONE);
IExpressionButton ceb=new IExpressionButton(){
  public void setExpression(  String expr){
    ChartUIUtil.setText(control,expr);
  }
  public void setEnabled(  boolean bEnabled){
    control.setEnabled(bEnabled);
  }
  public boolean isEnabled(){
    return control.isEnabled();
  }
  public String getExpression(){
    return ChartUIUtil.getText(control);
  }
  public String getDisplayExpression(){
    return getExpression();
  }
  public void addListener(  Listener listener){
  }
  public void setAccessor(  EAttributeAccessor<String> accessor){
  }
  public String getExpressionType(){
    return null;
  }
  public boolean isCube(){
    return false;
  }
  public void setBindingName(  String bindingName,  boolean bNotifyEvents){
  }
  public void setExpression(  String expr,  boolean bNotifyEvents){
  }
  public void setAssitField(  IAssistField assistField){
  }
  public void setPredefinedQuery(  Object[] predefinedQuery){
  }
}
;
outData=ceb;
break;
}
return outData;
}
Program: 67806
Project: 67806
Buggy source:
private int getFilterType(IFilterDefinition filter,Set<DimLevel> dimLevelInCubeQuery) throws DataException {
  if (!(filter instanceof ICubeFilterDefinition)) {
    if (filter.getExpression() instanceof ICollectionConditionalExpression) {
      Collection<IScriptExpression> exprs=((ICollectionConditionalExpression)(filter.getExpression())).getExpr();
      Set dimensionSet=new HashSet();
      Iterator<IScriptExpression> exprsIterator=exprs.iterator();
      while (exprsIterator.hasNext()) {
        dimensionSet.add(OlapExpressionUtil.getTargetDimLevel(exprsIterator.next().getText()).getDimensionName());
      }
      if (dimensionSet.size() == 1)       return CubeQueryExecutor.DIMENSION_FILTER;
 else       return CubeQueryExecutor.FACTTABLE_FILTER;
    }
    return CubeQueryExecutor.DIMENSION_FILTER;
  }
  ICubeFilterDefinition cubeFilter=(ICubeFilterDefinition)filter;
  if (cubeFilter.getTargetLevel() != null)   return CubeQueryExecutor.DIMENSION_FILTER;
  Set<DimLevel> refDimLevels=OlapExpressionCompiler.getReferencedDimLevel(filter.getExpression(),this.defn.getBindings());
  if (refDimLevels.size() > 0)   return CubeQueryExecutor.FACTTABLE_FILTER;
  return CubeQueryExecutor.AGGR_MEASURE_FILTER;
}

Fixed version (ground truth):
private int getFilterType(IFilterDefinition filter,Set<DimLevel> dimLevelInCubeQuery) throws DataException {
  if (!(filter instanceof ICubeFilterDefinition)) {
    if (filter.getExpression() instanceof ICollectionConditionalExpression) {
      Collection<IScriptExpression> exprs=((ICollectionConditionalExpression)(filter.getExpression())).getExpr();
      Set dimensionSet=new HashSet();
      Iterator<IScriptExpression> exprsIterator=exprs.iterator();
      while (exprsIterator.hasNext()) {
        dimensionSet.add(OlapExpressionUtil.getTargetDimLevel(exprsIterator.next().getText()).getDimensionName());
      }
      if (dimensionSet.size() == 1)       return CubeQueryExecutor.DIMENSION_FILTER;
 else       return CubeQueryExecutor.FACTTABLE_FILTER;
    }
    return CubeQueryExecutor.DIMENSION_FILTER;
  }
  ICubeFilterDefinition cubeFilter=(ICubeFilterDefinition)filter;
  if (cubeFilter.getTargetLevel() != null)   return CubeQueryExecutor.DIMENSION_FILTER;
  String measure=OlapExpressionCompiler.getReferencedScriptObject(filter.getExpression(),"String_Node_Str");
  if (measure != null)   return CubeQueryExecutor.FACTTABLE_FILTER;
  List bindingName=ExpressionCompilerUtil.extractColumnExpression(filter.getExpression(),ScriptConstants.DATA_BINDING_SCRIPTABLE);
  if (existAggregationBinding(bindingName,this.defn.getBindings()))   return CubeQueryExecutor.AGGR_MEASURE_FILTER;
  return CubeQueryExecutor.FACTTABLE_FILTER;
}
Program: 67807
Project: 67807
Buggy source:
public boolean isValidExpression(String expression){
  if (context.getDataServiceProvider().checkState(IDataServiceProvider.SHARE_QUERY) || context.getDataServiceProvider().checkState(IDataServiceProvider.INHERIT_COLUMNS_GROUPS)) {
    if (cmbDefinition == null)     return false;
    int index=cmbDefinition.indexOf(expression);
    if (index < 0) {
      return false;
    }
    return true;
  }
  if (cmbDefinition != null && context.getDataServiceProvider().checkState(IDataServiceProvider.HAS_CUBE)) {
    String[] items=cmbDefinition.getItems();
    for (    String s : items) {
      if (s.indexOf(expression) > 0) {
        return true;
      }
    }
    return false;
  }
  return true;
}

Fixed version (ground truth):
public boolean isValidExpression(String expression){
  if (context.getDataServiceProvider().checkState(IDataServiceProvider.SHARE_QUERY) || context.getDataServiceProvider().checkState(IDataServiceProvider.INHERIT_COLUMNS_GROUPS) || context.getDataServiceProvider().checkState(IDataServiceProvider.HAS_CUBE)) {
    if (cmbDefinition == null)     return false;
    int index=cmbDefinition.indexOf(expression);
    if (index < 0) {
      return false;
    }
    return true;
  }
  return true;
}
Program: 67808
Project: 67808
Buggy source:
public void drop(DropTargetEvent event){
  String bindingName=(String)event.data;
  if (Platform.OS_MACOSX.equals(Platform.getOS())) {
    if (!DataDefinitionTextManager.getInstance().isValidExpression(txtDataDefn,bindingName)) {
      return;
    }
  }
  btnBuilder.setBindingName(bindingName,true);
}

Fixed version (ground truth):
public void drop(DropTargetEvent event){
  String bindingName=(String)event.data;
  if (Platform.OS_MACOSX.equals(Platform.getOS())) {
    ExpressionCodec expCodec=ChartModelHelper.instance().createExpressionCodec();
    expCodec.setBindingName(bindingName,btnBuilder.isCube());
    if (!DataDefinitionTextManager.getInstance().isValidExpression(txtDataDefn,expCodec.getExpression())) {
      return;
    }
  }
  btnBuilder.setBindingName(bindingName,true);
}
Program: 67809
Project: 67809
Buggy source:
public void dragEnter(DropTargetEvent event){
  event.detail=DND.DROP_COPY;
  if (!Platform.OS_MACOSX.equals(Platform.getOS())) {
    Object object=null;
    Transfer[] transferAgents=((DropTarget)event.widget).getTransfer();
    for (int i=0; i < transferAgents.length; i++) {
      Transfer transfer=transferAgents[i];
      if (transfer != null && transfer instanceof SimpleTextTransfer) {
        object=SimpleTextTransfer.getInstance().nativeToJava(event.currentDataType);
        break;
      }
    }
    if (object != null && !DataDefinitionTextManager.getInstance().isValidExpression(txtDataDefn,object.toString())) {
      event.detail=DND.DROP_NONE;
    }
  }
}

Fixed version (ground truth):
public void dragEnter(DropTargetEvent event){
  event.detail=DND.DROP_COPY;
  if (!Platform.OS_MACOSX.equals(Platform.getOS())) {
    Object object=null;
    Transfer[] transferAgents=((DropTarget)event.widget).getTransfer();
    for (int i=0; i < transferAgents.length; i++) {
      Transfer transfer=transferAgents[i];
      if (transfer != null && transfer instanceof SimpleTextTransfer) {
        object=SimpleTextTransfer.getInstance().nativeToJava(event.currentDataType);
        break;
      }
    }
    if (object != null) {
      ExpressionCodec expCodec=ChartModelHelper.instance().createExpressionCodec();
      expCodec.setBindingName(object.toString(),btnBuilder.isCube());
      if (!DataDefinitionTextManager.getInstance().isValidExpression(txtDataDefn,expCodec.getExpression())) {
        event.detail=DND.DROP_NONE;
      }
    }
  }
}