nus-yam/ex-repair huggingface dataset:
Program: 73219
Project: 73219
Buggy source:
/** 
 * start cell update content cache
 * @param cell
 */
public int getRowSpan(ICellContent cell){
  int groupLevel=getGroupLevel();
  int rowSpan=cell.getRowSpan();
  if (groupLevel >= 0) {
    CellDesign cellDesign=(CellDesign)cell.getGenerateBy();
    if (cellDesign != null) {
      String dropType=cellDesign.getDrop();
      if (dropType != null && !"String_Node_Str".equals(dropType)) {
        return createDropID(groupLevel,dropType);
      }
    }
  }
  return rowSpan;
}

Fixed version (ground truth):
/** 
 * start cell update content cache
 * @param cell
 */
public int getRowSpan(ICellContent cell){
  int groupLevel=getGroupLevel();
  int rowSpan=cell.getRowSpan();
  if (groupLevel >= 0) {
    Object generateBy=cell.getGenerateBy();
    if (generateBy instanceof CellDesign) {
      CellDesign cellDesign=(CellDesign)generateBy;
      if (cellDesign != null) {
        String dropType=cellDesign.getDrop();
        if (dropType != null && !"String_Node_Str".equals(dropType)) {
          return createDropID(groupLevel,dropType);
        }
      }
    }
  }
  return rowSpan;
}
Program: 73220
Project: 73220
Buggy source:
private boolean needSave(IContent content){
  InstanceID id=content.getInstanceID();
  if (id == null || id.getComponentID() == -1) {
    return true;
  }
  IContent parent=(IContent)content.getParent();
  if (parent != null) {
    InstanceID pid=parent.getInstanceID();
    if (pid == null || pid.getComponentID() == -1) {
      return true;
    }
  }
  if (content instanceof AbstractContent) {
    return ((AbstractContent)content).needSave();
  }
  return true;
}

Fixed version (ground truth):
private boolean needSave(IContent content){
  InstanceID id=content.getInstanceID();
  if (id == null || id.getComponentID() == -1) {
    return true;
  }
  IContent parent=(IContent)content.getParent();
  if (parent != null) {
    InstanceID pid=parent.getInstanceID();
    if (pid == null || pid.getComponentID() == -1) {
      return true;
    }
    if (parent.getGenerateBy() instanceof ExtendedItemDesign) {
      return true;
    }
  }
  if (content instanceof AbstractContent) {
    return ((AbstractContent)content).needSave();
  }
  return true;
}
Program: 73222
Project: 73222
Buggy source:
/** 
 * parse the URLs by input path string
 * @param paths
 * @return
 */
public static URL[] parseURLs(String paths){
  ArrayList urls=new ArrayList();
  if (paths != null) {
    String[] classpaths=paths.split(PROPERTYSEPARATOR,-1);
    if (classpaths != null && classpaths.length != 0) {
      for (int j=0; j < classpaths.length; j++) {
        File file=new File(classpaths[j]);
        try {
          urls.add(file.toURL());
        }
 catch (        MalformedURLException e) {
          e.printStackTrace();
        }
      }
    }
  }
  URL[] oUrls=new URL[urls.size()];
  urls.toArray(oUrls);
  return oUrls;
}

Fixed version (ground truth):
/** 
 * parse the URLs by input path string
 * @param paths
 * @return
 */
public static URL[] parseURLs(String paths){
  ArrayList urls=new ArrayList();
  if (paths != null && paths.trim().length() > 0) {
    String[] classpaths=paths.split(PROPERTYSEPARATOR,-1);
    if (classpaths != null && classpaths.length != 0) {
      for (int j=0; j < classpaths.length; j++) {
        File file=new File(classpaths[j]);
        try {
          urls.add(file.toURL());
        }
 catch (        MalformedURLException e) {
          e.printStackTrace();
        }
      }
    }
  }
  URL[] oUrls=new URL[urls.size()];
  urls.toArray(oUrls);
  return oUrls;
}
Program: 73223
Project: 73223
Buggy source:
public boolean isEnabled(){
  return DNDUtil.handleValidateTargetCanContain(getSelection(),getClipBoardContents()) && DNDUtil.handleValidateTargetCanContainMore(getSelection(),DNDUtil.getObjectLength(getClipBoardContents()));
}

Fixed version (ground truth):
public boolean isEnabled(){
  if (getSelection() instanceof DesignElementHandle) {
    DesignElementHandle elementHandle=(DesignElementHandle)getSelection();
    if (getClipBoardContents() instanceof IDesignElement) {
      IDesignElement content=(IDesignElement)getClipBoardContents();
      try {
        if (!elementHandle.canPaste(DEUtil.getDefaultContentName(elementHandle),content))         return false;
      }
 catch (      SemanticException e) {
      }
    }
 else     if (getClipBoardContents() instanceof Object[]) {
      Object[] array=(Object[])getClipBoardContents();
      for (int i=0; i < array.length; i++) {
        if (array[i] instanceof IDesignElement) {
          IDesignElement content=(IDesignElement)array[i];
          try {
            if (!elementHandle.canPaste(DEUtil.getDefaultContentName(elementHandle),content))             return false;
          }
 catch (          SemanticException e) {
          }
        }
      }
    }
  }
  return DNDUtil.handleValidateTargetCanContain(getSelection(),getClipBoardContents()) && DNDUtil.handleValidateTargetCanContainMore(getSelection(),DNDUtil.getObjectLength(getClipBoardContents()));
}
Program: 73224
Project: 73224
Buggy source:
public URL getResource(String name){
  URL url=ApplicationClassLoader.class.getClassLoader().getResource(name);
  if (url == null) {
    if (loader == null) {
      createWrappedClassLoaders();
    }
    return loader.getResource(name);
  }
  return null;
}

Fixed version (ground truth):
public URL getResource(String name){
  URL url=IReportEngine.class.getClassLoader().getResource(name);
  if (url == null) {
    if (loader == null) {
      createWrappedClassLoaders();
    }
    return loader.getResource(name);
  }
  return null;
}
Program: 73225
Project: 73225
Buggy source:
public Class loadClass(String className) throws ClassNotFoundException {
  try {
    return ApplicationClassLoader.class.getClassLoader().loadClass(className);
  }
 catch (  ClassNotFoundException ex) {
    if (loader == null) {
      createWrappedClassLoaders();
    }
    return loader.loadClass(className);
  }
}

Fixed version (ground truth):
public Class loadClass(String className) throws ClassNotFoundException {
  try {
    return IReportEngine.class.getClassLoader().loadClass(className);
  }
 catch (  ClassNotFoundException ex) {
    if (loader == null) {
      createWrappedClassLoaders();
    }
    return loader.loadClass(className);
  }
}
Program: 73227
Project: 73227
Buggy source:
/** 
 * Start web application.
 */
private static void startWebApp(){
  try {
    String debugMode=System.getProperty(REPORT_DEBUT_MODE);
    if (debugMode == null) {
      ViewerClassPathHelper.setWorkspaceClassPath();
    }
    WebappAccessor.start(ViewerPlugin.WEBAPP_CONTEXT);
  }
 catch (  CoreException e) {
  }
}

Fixed version (ground truth):
/** 
 * Start web application.
 */
private synchronized static void startWebApp(){
  try {
    String debugMode=System.getProperty(REPORT_DEBUT_MODE);
    if (debugMode == null) {
      String classpaths=ViewerClassPathHelper.getWorkspaceClassPath();
      URL[] urls=ViewerClassPathHelper.parseURLs(classpaths);
      if (reloadableClassLoader == null) {
        reloadableClassLoader=new ReloadableClassLoader(urls,WebViewer.class.getClassLoader());
      }
 else {
        reloadableClassLoader.setUrls(urls);
        reloadableClassLoader.reload();
      }
    }
    WebappAccessor.start(ViewerPlugin.WEBAPP_CONTEXT);
  }
 catch (  CoreException e) {
  }
}
Program: 73228
Project: 73228
Buggy source:
public ReportDocumentReader(String systemId,ReportEngine engine,IDocArchiveReader archive,boolean sharedArchive) throws EngineException {
  this.engine=engine;
  this.archive=archive;
  this.systemId=systemId;
  this.sharedArchive=sharedArchive;
  this.moduleOptions=new HashMap();
  this.moduleOptions.put(ModuleOption.PARSER_SEMANTIC_CHECK_KEY,Boolean.FALSE);
  try {
    archive.open();
    doRefresh();
  }
 catch (  IOException ee) {
    close();
    throw new EngineException("String_Node_Str",ee);
  }
}

Fixed version (ground truth):
public ReportDocumentReader(String systemId,ReportEngine engine,IDocArchiveReader archive,boolean sharedArchive) throws EngineException {
  this(systemId,engine,archive,sharedArchive,null);
}
Program: 73229
Project: 73229
Buggy source:
public IReportDocument openReportDocument(String systemId,IDocArchiveReader archive,Map options) throws EngineException {
  ReportDocumentReader reader=new ReportDocumentReader(systemId,engine,archive);
  if (options == null) {
    options=new HashMap();
  }
  intializeModuleOptions(options);
  reader.setModuleOptions(options);
  return reader;
}

Fixed version (ground truth):
public IReportDocument openReportDocument(String systemId,IDocArchiveReader archive,Map options) throws EngineException {
  if (options == null) {
    options=new HashMap();
  }
  intializeModuleOptions(options);
  ReportDocumentReader reader=new ReportDocumentReader(systemId,engine,archive,options);
  return reader;
}
Program: 73230
Project: 73230
Buggy source:
public Class loadClass(String className) throws ClassNotFoundException {
  try {
    return IReportEngine.class.getClassLoader().loadClass(className);
  }
 catch (  ClassNotFoundException ex) {
    if (loader == null) {
      createWrappedClassLoaders();
    }
    return loader.loadClass(className);
  }
}

Fixed version (ground truth):
public Class loadClass(String className) throws ClassNotFoundException {
  try {
    return ApplicationClassLoader.class.getClassLoader().loadClass(className);
  }
 catch (  ClassNotFoundException ex) {
    if (loader == null) {
      createWrappedClassLoaders();
    }
    return loader.loadClass(className);
  }
}
Program: 73235
Project: 73235
Buggy source:
private void initBindings(ICubeQueryDefinition cubeQuery,CubeHandle cube) throws BirtException {
  for (Iterator bindings=ChartReportItemUtil.getAllColumnBindingsIterator(handle); bindings.hasNext(); ) {
    ComputedColumnHandle column=(ComputedColumnHandle)bindings.next();
    Binding binding=new Binding(column.getName());
    binding.setDataType(DataAdapterUtil.adaptModelDataType(column.getDataType()));
    binding.setExpression(new ScriptExpression(column.getExpression()));
    List lstAggOn=column.getAggregateOnList();
    if (!bLivePreview && !lstAggOn.isEmpty()) {
      addAggregateOn(binding,lstAggOn,cubeQuery,cube);
      binding.setAggrFunction(column.getAggregateFunction() == null ? null : DataAdapterUtil.adaptModelAggregationType(column.getAggregateFunction()));
    }
    registeredBindings.put(ExpressionUtil.createJSDataExpression(column.getName()),binding);
    registeredQueries.put(binding.getBindingName(),column.getExpression());
  }
}

Fixed version (ground truth):
private void initBindings(ICubeQueryDefinition cubeQuery,CubeHandle cube) throws BirtException {
  for (Iterator bindings=ChartReportItemUtil.getAllColumnBindingsIterator(handle); bindings.hasNext(); ) {
    ComputedColumnHandle column=(ComputedColumnHandle)bindings.next();
    Binding binding=new Binding(column.getName());
    binding.setDataType(DataAdapterUtil.adaptModelDataType(column.getDataType()));
    binding.setExpression(new ScriptExpression(column.getExpression()));
    binding.setAggrFunction(column.getAggregateFunction() == null ? null : DataAdapterUtil.adaptModelAggregationType(column.getAggregateFunction()));
    List lstAggOn=column.getAggregateOnList();
    if (!bLivePreview && !lstAggOn.isEmpty()) {
      addAggregateOn(binding,lstAggOn,cubeQuery,cube);
    }
    registeredBindings.put(column.getName(),binding);
    registeredQueries.put(binding.getBindingName(),column.getExpression());
  }
}
Program: 73237
Project: 73237
Buggy source:
/** 
 * parse the URLs by input path string
 * @param paths
 * @return
 */
public static URL[] parseURLs(String paths){
  ArrayList urls=new ArrayList();
  String[] classpaths=paths.split(PROPERTYSEPARATOR,-1);
  if (classpaths != null && classpaths.length != 0) {
    for (int j=0; j < classpaths.length; j++) {
      File file=new File(classpaths[j]);
      try {
        urls.add(file.toURL());
      }
 catch (      MalformedURLException e) {
        e.printStackTrace();
      }
    }
  }
  URL[] oUrls=new URL[urls.size()];
  urls.toArray(oUrls);
  return oUrls;
}

Fixed version (ground truth):
/** 
 * parse the URLs by input path string
 * @param paths
 * @return
 */
public static URL[] parseURLs(String paths){
  ArrayList urls=new ArrayList();
  if (paths != null) {
    String[] classpaths=paths.split(PROPERTYSEPARATOR,-1);
    if (classpaths != null && classpaths.length != 0) {
      for (int j=0; j < classpaths.length; j++) {
        File file=new File(classpaths[j]);
        try {
          urls.add(file.toURL());
        }
 catch (        MalformedURLException e) {
          e.printStackTrace();
        }
      }
    }
  }
  URL[] oUrls=new URL[urls.size()];
  urls.toArray(oUrls);
  return oUrls;
}
Program: 73240
Project: 73240
Buggy source:
/** 
 * @param outerResults
 * @param dsRT
 * @param queryDefn
 * @param scope
 */
ParameterUtil(IQueryService outerResults,DataSetRuntime dsRT,IQueryDefinition queryDefn,Scriptable scope){
  Object[] params={outerResults,dsRT,queryDefn,scope};
  logger.entering(ParameterUtil.class.getName(),"String_Node_Str",params);
  this.outerResults=outerResults;
  this.dsRT=dsRT;
  this.queryDefn=queryDefn;
  this.scope=scope;
  logger.exiting(ParameterUtil.class.getName(),"String_Node_Str");
}

Fixed version (ground truth):
/** 
 * @param outerResults
 * @param dsRT
 * @param queryDefn
 * @param scope
 */
ParameterUtil(Scriptable outerScope,DataSetRuntime dsRT,IQueryDefinition queryDefn,Scriptable scope){
  Object[] params={outerScope,dsRT,queryDefn,scope};
  logger.entering(ParameterUtil.class.getName(),"String_Node_Str",params);
  this.outerScope=outerScope;
  this.dsRT=dsRT;
  this.queryDefn=queryDefn;
  this.scope=scope;
  logger.exiting(ParameterUtil.class.getName(),"String_Node_Str");
}
Program: 73241
Project: 73241
Buggy source:
/** 
 * @param scope
 * @param cx
 * @param iParamBind
 * @return
 * @throws DataException
 */
private Object evaluateInputParameterValue(Scriptable scope,Context cx,IInputParameterBinding iParamBind) throws DataException {
  Object evaluateResult=null;
  Scriptable evaluateScope=scope;
  try {
    evaluateResult=ExprEvaluateUtil.evaluateRawExpression2(iParamBind.getExpr(),outerResults == null ? evaluateScope : outerResults.getQueryScope());
  }
 catch (  BirtException e) {
    DataException dataEx=new DataException(ResourceConstants.UNEXPECTED_ERROR,e);
    if (logger != null)     logger.logp(Level.FINE,PreparedOdaDSQuery.class.getName(),"String_Node_Str","String_Node_Str",e);
    throw dataEx;
  }
  return evaluateResult;
}

Fixed version (ground truth):
/** 
 * @param scope
 * @param cx
 * @param iParamBind
 * @return
 * @throws DataException
 */
private Object evaluateInputParameterValue(Scriptable scope,Context cx,IInputParameterBinding iParamBind) throws DataException {
  Object evaluateResult=null;
  Scriptable evaluateScope=scope;
  try {
    evaluateResult=ExprEvaluateUtil.evaluateRawExpression2(iParamBind.getExpr(),this.outerScope == null ? evaluateScope : this.outerScope);
  }
 catch (  BirtException e) {
    DataException dataEx=new DataException(ResourceConstants.UNEXPECTED_ERROR,e);
    if (logger != null)     logger.logp(Level.FINE,PreparedOdaDSQuery.class.getName(),"String_Node_Str","String_Node_Str",e);
    throw dataEx;
  }
  return evaluateResult;
}
Program: 73242
Project: 73242
Buggy source:
/** 
 * @param appContext
 * @throws DataException
 */
private void configureDataSetCache(IQueryDefinition querySpec,Map appContext,Scriptable scope) throws DataException {
  if (querySpec == null)   return;
  String queryResultID=querySpec.getQueryResultsID();
  if (queryResultID != null)   return;
  if (dataSetDesign == null)   return;
  if (!getDataSetCacheManager().needsToCache(dataSetDesign,appContext))   return;
  Collection parameterHints=null;
  IBaseDataSourceDesign dataSourceDesign=null;
  DataSourceRuntime dsRuntime=this.dataEngine.getDataSourceRuntime(dataSetDesign.getDataSourceName());
  if (dsRuntime != null) {
    dataSourceDesign=dsRuntime.getDesign();
    DataSetRuntime dataSet=DataSetRuntime.newInstance(dataSetDesign,null);
    parameterHints=new ParameterUtil(null,dataSet,this.queryDefn,scope).resolveDataSetParameters(true);
  }
  getDataSetCacheManager().setDataSourceAndDataSet(dataSourceDesign,dataSetDesign,parameterHints,this.appContext);
}

Fixed version (ground truth):
/** 
 * @param appContext
 * @throws DataException
 */
private void configureDataSetCache(Scriptable outerScope,IQueryDefinition querySpec,Map appContext,Scriptable scope) throws DataException {
  if (querySpec == null)   return;
  String queryResultID=querySpec.getQueryResultsID();
  if (queryResultID != null)   return;
  if (dataSetDesign == null)   return;
  if (!getDataSetCacheManager().needsToCache(dataSetDesign,appContext))   return;
  Collection parameterHints=null;
  IBaseDataSourceDesign dataSourceDesign=null;
  DataSourceRuntime dsRuntime=this.dataEngine.getDataSourceRuntime(dataSetDesign.getDataSourceName());
  if (dsRuntime != null) {
    dataSourceDesign=dsRuntime.getDesign();
    DataSetRuntime dataSet=DataSetRuntime.newInstance(dataSetDesign,null);
    parameterHints=new ParameterUtil(outerScope,dataSet,this.queryDefn,scope).resolveDataSetParameters(true);
  }
  getDataSetCacheManager().setDataSourceAndDataSet(dataSourceDesign,dataSetDesign,parameterHints,this.appContext);
}
Program: 73243
Project: 73243
Buggy source:
/** 
 * @param outerResults
 * @param scope
 * @return
 * @throws DataException
 */
public IQueryResults execute(IBaseQueryResults outerResults,Scriptable scope) throws DataException {
  this.configCache(scope);
  this.initializeExecution(outerResults,scope);
  return this.produceQueryResults(outerResults,scope);
}

Fixed version (ground truth):
/** 
 * @param outerResults
 * @param scope
 * @return
 * @throws DataException
 */
public IQueryResults execute(IBaseQueryResults outerResults,Scriptable scope) throws DataException {
  this.configureDataSetCache(outerResults instanceof IQueryService ? ((IQueryService)outerResults).getQueryScope() : null,queryDefn,appContext,scope != null ? scope : dataEngine.getSession().getSharedScope());
  this.initializeExecution(outerResults,scope);
  return this.produceQueryResults(outerResults,scope);
}
Program: 73244
Project: 73244
Buggy source:
/** 
 * @param driverName
 * @param driverProps
 * @return
 * @throws DataException
 */
private IDataSource getDataSource(String driverName,Map driverProps) throws DataException {
  PreparedOdaDSQuery self=PreparedOdaDSQuery.this;
  Collection paramHints=null;
  if (getDataSetCacheManager().needsToCache(this.dataSet.getDesign(),appContext))   paramHints=new ParameterUtil(null,this.dataSet,self.queryDefn,this.getQueryScope()).resolveDataSetParameters(true);
  return DataSourceFactory.getFactory().getDataSource(driverName,driverProps,this.dataSource.getDesign(),this.dataSet.getDesign(),paramHints,self.dataEngine.getSession(),appContext);
}

Fixed version (ground truth):
/** 
 * @param driverName
 * @param driverProps
 * @return
 * @throws DataException
 */
private IDataSource getDataSource(String driverName,Map driverProps) throws DataException {
  PreparedOdaDSQuery self=PreparedOdaDSQuery.this;
  Collection paramHints=null;
  if (getDataSetCacheManager().needsToCache(this.dataSet.getDesign(),appContext))   paramHints=new ParameterUtil(this.tabularOuterResults == null ? null : this.tabularOuterResults.getQueryScope(),this.dataSet,self.queryDefn,this.getQueryScope()).resolveDataSetParameters(true);
  return DataSourceFactory.getFactory().getDataSource(driverName,driverProps,this.dataSource.getDesign(),this.dataSet.getDesign(),paramHints,self.dataEngine.getSession(),appContext);
}
Program: 73245
Project: 73245
Buggy source:
/** 
 * @param evaluateValue
 * @return
 * @throws DataException
 */
protected Collection resolveDataSetParameters(boolean evaluateValue) throws DataException {
  return new ParameterUtil(this.tabularOuterResults,this.getDataSet(),(IQueryDefinition)this.baseQueryDefn,this.getQueryScope()).resolveDataSetParameters(evaluateValue);
}

Fixed version (ground truth):
/** 
 * @param evaluateValue
 * @return
 * @throws DataException
 */
protected Collection resolveDataSetParameters(boolean evaluateValue) throws DataException {
  return new ParameterUtil(this.tabularOuterResults == null ? null : this.tabularOuterResults.getQueryScope(),this.getDataSet(),(IQueryDefinition)this.baseQueryDefn,this.getQueryScope()).resolveDataSetParameters(evaluateValue);
}
Program: 73246
Project: 73246
Buggy source:
public Object getValue(String exprName) throws BirtException {
  checkStarted();
  logger.logp(Level.FINER,ResultIterator.class.getName(),"String_Node_Str","String_Node_Str" + LogUtil.toString(exprName));
  if (this.isFirstRowPepared) {
    if (this.isEmpty())     this.next();
 else     this.prepareCurrentRow();
  }
  if (!this.boundColumnValueMap.containsKey(exprName)) {
    if (this.resultService.getBindingExpr(exprName) != null) {
      return prepareBindingColumn(exprName);
    }
    throw new DataException(ResourceConstants.INVALID_BOUND_COLUMN_NAME,exprName);
  }
  Object exprValue=boundColumnValueMap.get(exprName);
  if (exprValue instanceof BirtException)   throw (BirtException)exprValue;
  return exprValue;
}

Fixed version (ground truth):
public Object getValue(String exprName) throws BirtException {
  checkStarted();
  logger.logp(Level.FINER,ResultIterator.class.getName(),"String_Node_Str","String_Node_Str" + LogUtil.toString(exprName));
  if (this.isFirstRowPepared) {
    if (this.isEmpty())     this.next();
 else     this.prepareCurrentRow();
  }
  if (!this.boundColumnValueMap.containsKey(exprName)) {
    if (this.resultService.getBindingExpr(exprName) != null) {
      return prepareBindingColumn(exprName);
    }
    throw new DataException(ResourceConstants.INVALID_BOUND_COLUMN_NAME,exprName);
  }
  Object exprValue=boundColumnValueMap.get(exprName);
  if (exprValue instanceof BirtException)   throw (BirtException)exprValue;
  if (exprValue instanceof DataExceptionMocker)   throw ((DataExceptionMocker)exprValue).getCause();
  return exprValue;
}
Program: 73247
Project: 73247
Buggy source:
protected void writeFields(DataOutputStream out) throws IOException {
  if (width != null) {
    IOUtil.writeInt(out,FIELD_WIDTH);
    width.writeObject(out);
  }
  if (styleClass != null) {
    IOUtil.writeInt(out,FIELD_STYLECLASS);
    IOUtil.writeString(out,styleClass);
  }
  if (instanceId != null) {
    IOUtil.writeInt(out,FIELD_INSTANCE_ID);
    IOUtil.writeString(out,instanceId.toString());
  }
  if (visibleFormat != null) {
    IOUtil.writeInt(out,FIELD_VISIBLE_FORMAT);
    IOUtil.writeString(out,visibleFormat);
  }
  if (inlineStyle != null) {
    String cssText=inlineStyle.getCssText();
    if (cssText != null && cssText.length() != 0) {
      IOUtil.writeInt(out,FIELD_INLINESTYLE);
      IOUtil.writeString(out,cssText);
    }
  }
}

Fixed version (ground truth):
protected void writeFields(DataOutputStream out) throws IOException {
  if (width != null) {
    IOUtil.writeInt(out,FIELD_WIDTH);
    width.writeObject(out);
  }
  if (styleClass != null) {
    IOUtil.writeInt(out,FIELD_STYLECLASS);
    IOUtil.writeString(out,styleClass);
  }
  if (instanceId != null) {
    IOUtil.writeInt(out,FIELD_INSTANCE_ID);
    IOUtil.writeString(out,instanceId.toString());
  }
  if (visibleFormat != null) {
    IOUtil.writeInt(out,FIELD_VISIBLE_FORMAT);
    IOUtil.writeString(out,visibleFormat);
  }
  if (inlineStyle != null) {
    String cssText=inlineStyle.getCssText();
    if (cssText != null && cssText.length() != 0) {
      IOUtil.writeInt(out,FIELD_INLINESTYLE);
      IOUtil.writeString(out,cssText);
    }
  }
  if (isColumnHeader != null) {
    IOUtil.writeInt(out,FIELD_ISCOLUMNHEADER);
    IOUtil.writeBool(out,isColumnHeader.booleanValue());
  }
}
Program: 73248
Project: 73248
Buggy source:
public void setColumnHeaderState(boolean isColumnHeader){
  this.isColumnHeader=new Boolean(isColumnHeader);
}

Fixed version (ground truth):
public void setColumnHeaderState(boolean isColumnHeader){
  this.isColumnHeader=Boolean.valueOf(isColumnHeader);
}
Program: 73249
Project: 73249
Buggy source:
protected void readField(int version,int filedId,DataInputStream in,ClassLoader loader) throws IOException {
switch (filedId) {
case FIELD_WIDTH:
    width=new DimensionType();
  width.readObject(in);
break;
case FIELD_STYLECLASS:
styleClass=IOUtil.readString(in);
break;
case FIELD_INSTANCE_ID:
String value=IOUtil.readString(in);
instanceId=InstanceID.parse(value);
break;
case FIELD_VISIBLE_FORMAT:
visibleFormat=IOUtil.readString(in);
break;
case FIELD_INLINESTYLE:
String style=IOUtil.readString(in);
if (style != null && style.length() != 0) {
inlineStyle=new StyleDeclaration(cssEngine);
inlineStyle.setCssText(style);
}
break;
}
}

Fixed version (ground truth):
protected void readField(int version,int filedId,DataInputStream in,ClassLoader loader) throws IOException {
switch (filedId) {
case FIELD_WIDTH:
    width=new DimensionType();
  width.readObject(in);
break;
case FIELD_STYLECLASS:
styleClass=IOUtil.readString(in);
break;
case FIELD_INSTANCE_ID:
String value=IOUtil.readString(in);
instanceId=InstanceID.parse(value);
break;
case FIELD_VISIBLE_FORMAT:
visibleFormat=IOUtil.readString(in);
break;
case FIELD_INLINESTYLE:
String style=IOUtil.readString(in);
if (style != null && style.length() != 0) {
inlineStyle=new StyleDeclaration(cssEngine);
inlineStyle.setCssText(style);
}
break;
case FIELD_ISCOLUMNHEADER:
isColumnHeader=Boolean.valueOf(IOUtil.readBool(in));
break;
}
}
Program: 73251
Project: 73251
Buggy source:
public void defineCube(CubeHandle cubeDesign) throws BirtException {
  if (!cubeHandleMap.containsKey(cubeDesign.getQualifiedName())) {
    this.cubeHandleMap.put(cubeDesign.getQualifiedName(),cubeDesign);
  }
}

Fixed version (ground truth):
public void defineCube(CubeHandle cubeHandle) throws BirtException {
  Set involvedDataSets=getInvolvedDataSets((TabularCubeHandle)cubeHandle);
  Iterator itr=involvedDataSets.iterator();
  while (itr.hasNext()) {
    DataSetHandle dsHandle=(DataSetHandle)itr.next();
    BaseDataSourceDesign baseDataSource=this.modelAdaptor.adaptDataSource(dsHandle.getDataSource());
    BaseDataSetDesign baseDataSet=this.modelAdaptor.adaptDataSet(dsHandle);
    this.defineDataSource(baseDataSource);
    this.defineDataSet(baseDataSet);
  }
  if (!cubeHandleMap.containsKey(cubeHandle.getQualifiedName())) {
    this.cubeHandleMap.put(cubeHandle.getQualifiedName(),cubeHandle);
  }
}
Program: 73253
Project: 73253
Buggy source:
/** 
 * Returns appcontext
 * @param request
 * @return
 */
public static Map getAppContext(HttpServletRequest request){
  HashMap context=new HashMap();
  Boolean isDesigner=Boolean.valueOf(ParameterAccessor.isDesigner(request));
  context.put("String_Node_Str",isDesigner);
  context.put(EngineConstants.APPCONTEXT_BIRT_VIEWER_HTTPSERVET_REQUEST,request);
  context.put(EngineConstants.APPCONTEXT_CHART_RESOLUTION,ParameterAccessor.getDpi(request));
  int maxCubeRowLevels=ParameterAccessor.getMaxCubeRowLevels(request);
  if (maxCubeRowLevels >= 0)   context.put(DataEngine.CUBECUSROR_FETCH_LIMIT_ON_ROW_EDGE,new Integer(maxCubeRowLevels));
  int maxCubeColumnLevels=ParameterAccessor.getMaxCubeColumnLevels(request);
  if (maxCubeColumnLevels >= 0)   context.put(DataEngine.CUBECURSOR_FETCH_LIMIT_ON_COLUMN_EDGE,new Integer(maxCubeColumnLevels));
  int cubeMemorySize=ParameterAccessor.getCubeMemorySize(request);
  if (cubeMemorySize >= 0)   context.put(DataEngine.IN_MEMORY_CUBE_SIZE,new Integer(cubeMemorySize));
  ParameterAccessor.pushAppContext(context,request);
  return context;
}

Fixed version (ground truth):
/** 
 * Returns appcontext
 * @param request
 * @return
 */
public static Map getAppContext(HttpServletRequest request){
  HashMap context=new HashMap();
  Boolean isDesigner=Boolean.valueOf(ParameterAccessor.isDesigner(request));
  context.put("String_Node_Str",isDesigner);
  context.put(EngineConstants.APPCONTEXT_BIRT_VIEWER_HTTPSERVET_REQUEST,request);
  context.put(EngineConstants.APPCONTEXT_CHART_RESOLUTION,ParameterAccessor.getDpi(request));
  int maxCubeRowLevels=ParameterAccessor.getMaxCubeRowLevels(request);
  if (maxCubeRowLevels >= 0)   context.put(DataEngine.CUBECUSROR_FETCH_LIMIT_ON_ROW_EDGE,new Integer(maxCubeRowLevels));
  int maxCubeColumnLevels=ParameterAccessor.getMaxCubeColumnLevels(request);
  if (maxCubeColumnLevels >= 0)   context.put(DataEngine.CUBECURSOR_FETCH_LIMIT_ON_COLUMN_EDGE,new Integer(maxCubeColumnLevels));
  int cubeMemorySize=ParameterAccessor.getCubeMemorySize(request);
  if (cubeMemorySize >= 0)   context.put(DataEngine.IN_MEMORY_CUBE_SIZE,new Integer(cubeMemorySize));
  context.put(IBirtConstants.APPCONTEXT_BIRT_RESOURCE_PATH,ParameterAccessor.getResourceFolder(request));
  ParameterAccessor.pushAppContext(context,request);
  return context;
}
Program: 73255
Project: 73255
Buggy source:
protected void addColumBinding(IBaseQueryDefinition transfer,ComputedColumnHandle columnBinding) throws BirtException {
  String name=columnBinding.getName();
  String expr=columnBinding.getExpression();
  String type=columnBinding.getDataType();
  int dbType=ModelDteApiAdapter.toDteDataType(type);
  IBaseExpression dbExpr=new ScriptExpression(expr,dbType);
  if (columnBinding.getAggregateOn() != null) {
    dbExpr.setGroupName(columnBinding.getAggregateOn());
  }
  IBinding binding=new Binding(name,dbExpr);
  if (columnBinding.getAggregateOn() != null)   binding.addAggregateOn(columnBinding.getAggregateOn());
  if (columnBinding.getAggregateFunction() != null) {
    binding.setAggrFunction(columnBinding.getAggregateFunction());
  }
  String filter=columnBinding.getFilterExpression();
  if (filter != null) {
    binding.setFilter(new ScriptExpression(filter));
  }
  Iterator arguments=columnBinding.argumentsIterator();
  if (arguments != null) {
    while (arguments.hasNext()) {
      AggregationArgumentHandle argumentHandle=(AggregationArgumentHandle)arguments.next();
      String argument=argumentHandle.getValue();
      if (argument != null) {
        binding.addArgument(new ScriptExpression(argument));
      }
    }
  }
  transfer.addBinding(binding);
}

Fixed version (ground truth):
protected void addColumBinding(IBaseQueryDefinition transfer,ComputedColumnHandle columnBinding) throws BirtException {
  String name=columnBinding.getName();
  String expr=columnBinding.getExpression();
  String type=columnBinding.getDataType();
  String displayName=columnBinding.getDisplayName();
  int dbType=ModelDteApiAdapter.toDteDataType(type);
  IBaseExpression dbExpr=new ScriptExpression(expr,dbType);
  if (columnBinding.getAggregateOn() != null) {
    dbExpr.setGroupName(columnBinding.getAggregateOn());
  }
  IBinding binding=new Binding(name,dbExpr);
  binding.setDisplayName(displayName);
  if (columnBinding.getAggregateOn() != null)   binding.addAggregateOn(columnBinding.getAggregateOn());
  if (columnBinding.getAggregateFunction() != null) {
    binding.setAggrFunction(columnBinding.getAggregateFunction());
  }
  String filter=columnBinding.getFilterExpression();
  if (filter != null) {
    binding.setFilter(new ScriptExpression(filter));
  }
  Iterator arguments=columnBinding.argumentsIterator();
  if (arguments != null) {
    while (arguments.hasNext()) {
      AggregationArgumentHandle argumentHandle=(AggregationArgumentHandle)arguments.next();
      String argument=argumentHandle.getValue();
      if (argument != null) {
        binding.addArgument(new ScriptExpression(argument));
      }
    }
  }
  transfer.addBinding(binding);
}
Program: 73257
Project: 73257
Buggy source:
/** 
 * Transfer the rset relation array to a string.
 * @param rsetRelation
 * @return
 */
private String getDteMetaInfoString(String[] rsetRelation){
  StringBuffer buffer=new StringBuffer();
  String pRsetId=rsetRelation[0];
  String rowId=rsetRelation[1];
  String queryId=rsetRelation[2];
  String rsetId=rsetRelation[3];
  buffer.setLength(0);
  buffer.append(pRsetId);
  buffer.append("String_Node_Str");
  buffer.append(rowId);
  buffer.append("String_Node_Str");
  buffer.append(queryId);
  buffer.append("String_Node_Str");
  buffer.append(rsetId);
  return buffer.toString();
}

Fixed version (ground truth):
/** 
 * Transfer the rset relation array to a string.
 * @param rsetRelation
 * @return
 */
private String getDteMetaInfoString(String[] rsetRelation){
  StringBuffer buffer=new StringBuffer();
  String pRsetId=rsetRelation[0];
  String rowId=rsetRelation[1];
  String queryId=rsetRelation[2];
  buffer.setLength(0);
  if (pRsetId == null) {
    buffer.append("String_Node_Str");
  }
 else {
    buffer.append(pRsetId);
  }
  buffer.append("String_Node_Str");
  buffer.append(rowId);
  buffer.append("String_Node_Str");
  buffer.append(queryId);
  return buffer.toString();
}
Program: 73259
Project: 73259
Buggy source:
public IExtractionResults extract() throws EngineException {
  try {
    String rsetName=resultSetName;
    if (rsetName == null) {
      if (instanceId != null) {
        rsetName=instanceId2RsetName(instanceId);
      }
    }
    if (rsetName != null) {
      return extractByResultSetName(rsetName);
    }
    if (instanceId != null) {
      return extractByInstanceID(instanceId);
    }
    return null;
  }
 catch (  BirtException ex) {
    throw new EngineException(ex.getLocalizedMessage(),ex);
  }
}

Fixed version (ground truth):
public IExtractionResults extract() throws EngineException {
  try {
    if (resultSetName != null) {
      return extractByResultSetName(resultSetName);
    }
    if (instanceId != null) {
      return extractByInstanceID(instanceId);
    }
    return null;
  }
 catch (  BirtException ex) {
    throw new EngineException(ex.getLocalizedMessage(),ex);
  }
}
Program: 73260
Project: 73260
Buggy source:
private void prepareMetaData(){
  if (isMetaDataPrepared == true)   return;
  HashMap queryIds=report.getQueryIDs();
  HashMap query2itemMapping=report.getReportItemToQueryMap();
  Iterator iter=queryIds.entrySet().iterator();
  while (iter.hasNext()) {
    Map.Entry entry=(Map.Entry)iter.next();
    IDataQueryDefinition baseQuery=(IDataQueryDefinition)entry.getKey();
    if (baseQuery instanceof IQueryDefinition) {
      IQueryDefinition query=(IQueryDefinition)baseQuery;
      String queryId=(String)entry.getValue();
      ReportItemDesign item=(ReportItemDesign)query2itemMapping.get(query);
      String queryName=item.getName();
      if (queryName == null) {
        queryName="String_Node_Str" + item.getID();
      }
      queryId2NameMapping.put(queryId,queryName);
      queryId2QueryMapping.put(queryId,query);
      ;
    }
  }
  try {
    loadResultSetMetaData();
  }
 catch (  Exception e) {
    logger.log(Level.WARNING,e.getMessage(),e);
  }
  isMetaDataPrepared=true;
}

Fixed version (ground truth):
private void prepareMetaData(){
  if (isMetaDataPrepared == true)   return;
  HashMap queryIds=report.getQueryIDs();
  HashMap query2itemMapping=report.getReportItemToQueryMap();
  Iterator iter=queryIds.entrySet().iterator();
  while (iter.hasNext()) {
    Map.Entry entry=(Map.Entry)iter.next();
    IDataQueryDefinition baseQuery=(IDataQueryDefinition)entry.getKey();
    if (baseQuery instanceof IQueryDefinition) {
      IQueryDefinition query=(IQueryDefinition)baseQuery;
      String queryId=(String)entry.getValue();
      ReportItemDesign item=(ReportItemDesign)query2itemMapping.get(query);
      String queryName=item.getName();
      if (queryName == null) {
        queryName="String_Node_Str" + item.getID();
      }
      queryId2NameMapping.put(queryId,queryName);
      queryId2QueryMapping.put(queryId,query);
      query2QueryIdMapping.put(query,queryId);
    }
  }
  try {
    loadResultSetMetaData();
  }
 catch (  Exception e) {
    logger.log(Level.WARNING,e.getMessage(),e);
  }
  isMetaDataPrepared=true;
}
Program: 73261
Project: 73261
Buggy source:
static boolean check(String source,int lineNumber){
  Context cx=Context.enter();
  Debugger oldDebugger=cx.getDebugger();
  Object oldContext=cx.getDebuggerContextData();
  boolean oldGenerate=cx.isGeneratingDebug();
  int oldLevel=cx.getOptimizationLevel();
  try {
    BreakableSourceChecker checker=new BreakableSourceChecker();
    checker.lineNumber=lineNumber + 1;
    cx.setDebugger(checker,null);
    cx.setGeneratingDebug(true);
    cx.setOptimizationLevel(-1);
    cx.evaluateString(new ImporterTopLevel(),source,"String_Node_Str",1,null);
    return checker.breakable;
  }
  finally {
    cx.setDebugger(oldDebugger,oldContext);
    cx.setGeneratingDebug(oldGenerate);
    cx.setOptimizationLevel(oldLevel);
    Context.exit();
  }
}

Fixed version (ground truth):
static boolean check(String source,int lineNumber){
  Context cx=Context.enter();
  Debugger oldDebugger=cx.getDebugger();
  Object oldContext=cx.getDebuggerContextData();
  boolean oldGenerate=cx.isGeneratingDebug();
  int oldLevel=cx.getOptimizationLevel();
  try {
    BreakableSourceChecker checker=new BreakableSourceChecker();
    checker.lineNumber=lineNumber + 1;
    cx.setDebugger(checker,null);
    cx.setGeneratingDebug(true);
    cx.setOptimizationLevel(-1);
    cx.compileString(source,"String_Node_Str",1,null);
    return checker.breakable;
  }
  finally {
    cx.setDebugger(oldDebugger,oldContext);
    cx.setGeneratingDebug(oldGenerate);
    cx.setOptimizationLevel(oldLevel);
    Context.exit();
  }
}
Program: 73263
Project: 73263
Buggy source:
public void dispose(){
  if (subBarMap != null) {
    for (Iterator iter=subBarMap.values().iterator(); iter.hasNext(); ) {
      SubActionBarDef def=(SubActionBarDef)iter.next();
      def.dispose();
    }
    subBarMap.clear();
  }
  currentActionBarDef.dispose();
  currentActionBarDef=null;
  super.dispose();
}

Fixed version (ground truth):
public void dispose(){
  if (subBarMap != null) {
    for (Iterator iter=subBarMap.values().iterator(); iter.hasNext(); ) {
      SubActionBarDef def=(SubActionBarDef)iter.next();
      def.dispose();
    }
    subBarMap.clear();
  }
  if (currentActionBarDef != null) {
    currentActionBarDef.deactivate();
    currentActionBarDef.dispose();
    currentActionBarDef=null;
  }
  super.dispose();
}
Program: 73264
Project: 73264
Buggy source:
public static IAction createStackAction(String id,CommandStack stack){
}

Fixed version (ground truth):
public static IAction createStackAction(String id,CommandStack stack){
  Assert.isNotNull(id);
  Assert.isNotNull(stack);
  GlobalStackActionEntry entry=(GlobalStackActionEntry)stackActionEntrys.get(stack);
  if (entry == null) {
    entry=new GlobalStackActionEntry(stack);
    stackActionEntrys.put(stack,entry);
  }
  return entry.getAction(id);
}
Program: 73265
Project: 73265
Buggy source:
public static IAction createSelectionAction(String id,ISelectionProvider provider){
}

Fixed version (ground truth):
public static IAction createSelectionAction(String id,ISelectionProvider provider){
  Assert.isNotNull(id);
  Assert.isNotNull(provider);
  if (COPY.equals(id)) {
    return new GlobalCopyAction(provider);
  }
 else   if (CUT.equals(id)) {
    return new GlobalCutAction(provider);
  }
 else   if (PASTE.equals(id)) {
    return new GlobalPasteAction(provider);
  }
 else   if (DELETE.equals(id)) {
    return new GlobalDeleteAction(provider);
  }
 else   if (NewDataSourceAction.ID.equals(id)) {
    return new NewDataSourceAction();
  }
 else   if (NewDataSetAction.ID.equals(id)) {
    return new NewDataSetAction();
  }
 else   if (NewJointDataSetAction.ID.equals(id)) {
    return new NewJointDataSetAction();
  }
  String elementType=null;
  if (GeneralInsertMenuAction.INSERT_TEXT_ID.equals(id)) {
    elementType=ReportDesignConstants.TEXT_ITEM;
  }
 else   if (GeneralInsertMenuAction.INSERT_LABEL_ID.equals(id)) {
    elementType=ReportDesignConstants.LABEL_ITEM;
  }
 else   if (GeneralInsertMenuAction.INSERT_DATA_ID.equals(id)) {
    elementType=ReportDesignConstants.DATA_ITEM;
  }
 else   if (GeneralInsertMenuAction.INSERT_IMAGE_ID.equals(id)) {
    elementType=ReportDesignConstants.IMAGE_ITEM;
  }
 else   if (GeneralInsertMenuAction.INSERT_GRID_ID.equals(id)) {
    elementType=ReportDesignConstants.GRID_ITEM;
  }
 else   if (GeneralInsertMenuAction.INSERT_LIST_ID.equals(id)) {
    elementType=ReportDesignConstants.LIST_ITEM;
  }
 else   if (GeneralInsertMenuAction.INSERT_TABLE_ID.equals(id)) {
    elementType=ReportDesignConstants.TABLE_ITEM;
  }
 else   if (GeneralInsertMenuAction.INSERT_DYNAMIC_TEXT_ID.equals(id)) {
    elementType=ReportDesignConstants.TEXT_DATA_ITEM;
  }
 else   if (InsertRowAboveAction.ID.equals(id)) {
    return new GlobalInsertRowAction(provider,id,InsertAction.ABOVE);
  }
 else   if (InsertRowBelowAction.ID.equals(id)) {
    return new GlobalInsertRowAction(provider,id,InsertAction.BELOW);
  }
 else   if (NewParameterAction.INSERT_SCALAR_PARAMETER.equals(id)) {
    return new NewParameterAction(id,ReportDesignConstants.SCALAR_PARAMETER_ELEMENT);
  }
 else   if (NewParameterAction.INSERT_CASCADING_PARAMETER_GROUP.equals(id)) {
    return new NewParameterAction(id,ReportDesignConstants.CASCADING_PARAMETER_GROUP_ELEMENT);
  }
 else   if (NewParameterAction.INSERT_PARAMETER_GROUP.equals(id)) {
    return new NewParameterAction(id,ReportDesignConstants.PARAMETER_GROUP_ELEMENT);
  }
 else {
    if (DEUtil.getMetaDataDictionary().getExtension(id) != null) {
      elementType=id;
    }
  }
  if (elementType != null) {
    GlobalInsertAction action=new GlobalInsertAction(provider,id,elementType);
    action.setText(DEUtil.getElementDefn(elementType).getDisplayName());
    return action;
  }
  return null;
}
Program: 73266
Project: 73266
Buggy source:
public IContent execute(){
  ListGroupDesign groupDesign=(ListGroupDesign)getDesign();
  IListGroupContent groupContent=report.createListGroupContent();
  setContent(groupContent);
  restoreResultSet();
  initializeContent(groupDesign,groupContent);
  processBookmark(groupDesign,groupContent);
  handlePageBreakInsideOfGroup();
  handlePageBreakBeforeOfGroup();
  handlePageBreakAfterOfGroup();
  handlePageBreakAfterOfPreviousGroup();
  handlePageBreakBefore();
  startGroupTOCEntry(groupContent);
  prepareToExecuteChildren();
  return groupContent;
}

Fixed version (ground truth):
public IContent execute(){
  ListGroupDesign groupDesign=(ListGroupDesign)getDesign();
  IListGroupContent groupContent=report.createListGroupContent();
  setContent(groupContent);
  restoreResultSet();
  initializeContent(groupDesign,groupContent);
  processBookmark(groupDesign,groupContent);
  handlePageBreakInsideOfGroup();
  handlePageBreakBeforeOfGroup();
  handlePageBreakAfterOfGroup();
  handlePageBreakAfterOfPreviousGroup();
  handlePageBreakBefore();
  if (context.isInFactory()) {
    handleOnCreate(groupContent);
  }
  startGroupTOCEntry(groupContent);
  prepareToExecuteChildren();
  return groupContent;
}
Program: 73267
Project: 73267
Buggy source:
public IContent execute(){
  TableGroupDesign groupDesign=(TableGroupDesign)getDesign();
  ITableGroupContent groupContent=report.createTableGroupContent();
  setContent(groupContent);
  restoreResultSet();
  initializeContent(groupDesign,groupContent);
  processBookmark(groupDesign,groupContent);
  handlePageBreakInsideOfGroup();
  handlePageBreakBeforeOfGroup();
  handlePageBreakAfterOfGroup();
  handlePageBreakAfterOfPreviousGroup();
  handlePageBreakBefore();
  startGroupTOCEntry(groupContent);
  prepareToExecuteChildren();
  return groupContent;
}

Fixed version (ground truth):
public IContent execute(){
  TableGroupDesign groupDesign=(TableGroupDesign)getDesign();
  ITableGroupContent groupContent=report.createTableGroupContent();
  setContent(groupContent);
  restoreResultSet();
  initializeContent(groupDesign,groupContent);
  processBookmark(groupDesign,groupContent);
  handlePageBreakInsideOfGroup();
  handlePageBreakBeforeOfGroup();
  handlePageBreakAfterOfGroup();
  handlePageBreakAfterOfPreviousGroup();
  handlePageBreakBefore();
  if (context.isInFactory()) {
    handleOnCreate(groupContent);
  }
  startGroupTOCEntry(groupContent);
  prepareToExecuteChildren();
  return groupContent;
}
Program: 73268
Project: 73268
Buggy source:
public Object visitListGroup(ListGroupDesign group,Object value){
  return visitReportItem(group,value);
}

Fixed version (ground truth):
public Object visitListGroup(ListGroupDesign group,Object value){
  ListGroupScriptExecutor.handleOnCreate((IListGroupContent)value,context);
  return value;
}
Program: 73269
Project: 73269
Buggy source:
public Object visitTableGroup(TableGroupDesign group,Object value){
  return visitReportItem(group,value);
}

Fixed version (ground truth):
public Object visitTableGroup(TableGroupDesign group,Object value){
  TableGroupScriptExecutor.handleOnCreate((ITableGroupContent)value,context);
  return value;
}
Program: 73270
Project: 73270
Buggy source:
public Object visitListGroup(ListGroupDesign group,Object value){
  return visitReportItem(group,value);
}

Fixed version (ground truth):
public Object visitListGroup(ListGroupDesign group,Object value){
  ListGroupScriptExecutor.handleOnRender((IListGroupContent)value,context);
  return value;
}
Program: 73271
Project: 73271
Buggy source:
public Object visitTableGroup(TableGroupDesign group,Object value){
  return visitReportItem(group,value);
}

Fixed version (ground truth):
public Object visitTableGroup(TableGroupDesign group,Object value){
  TableGroupScriptExecutor.handleOnRender((ITableGroupContent)value,context);
  return value;
}
Program: 73272
Project: 73272
Buggy source:
/** 
 * With group and filter
 * @throws BirtException
 */
public void testBasicIVSubQuery() throws Exception {
  this.GEN_add_filter=false;
  this.GEN_add_group=true;
  this.GEN_subquery_on_group=true;
  this._genBasicIVWithSubQuery();
  this.closeArchiveWriter();
  DataEngineContext deContext2=newContext(DataEngineContext.MODE_PRESENTATION,fileName);
  myPreDataEngine=DataEngine.newDataEngine(deContext2);
  this.PRE_add_filter=true;
  this.PRE_add_sort=true;
  this.PRE_add_group=true;
  this._preBasicIVWithSubQuery();
  this.closeArchiveReader();
  this.checkOutputFile();
}

Fixed version (ground truth):
/** 
 * With group and filter
 * @throws BirtException
 */
public void testBasicIVSubQuery() throws Exception {
  this.GEN_add_filter=false;
  this.GEN_add_group=true;
  this.GEN_subquery_on_group=true;
  this._genBasicIVWithSubQuery();
  this.closeArchiveWriter();
  DataEngineContext deContext2=newContext(DataEngineContext.MODE_UPDATE,fileName,fileName);
  myPreDataEngine=DataEngine.newDataEngine(deContext2);
  this.PRE_add_filter=true;
  this.PRE_add_sort=true;
  this.PRE_add_group=true;
  this._preBasicIVWithSubQuery();
  this.closeArchiveReader();
  this.checkOutputFile();
}
Program: 73273
Project: 73273
Buggy source:
/** 
 * @throws Exception
 */
public void testBasicIV5() throws Exception {
  this.GEN_add_filter=true;
  this.GEN_add_group=true;
  this.genBasicIV();
  this.closeArchiveWriter();
  DataEngineContext deContext2=newContext(DataEngineContext.MODE_PRESENTATION,fileName);
  myPreDataEngine=DataEngine.newDataEngine(deContext2);
  this.PRE_add_filter=true;
  this.PRE_add_sort=true;
  this.PRE_add_group=true;
  this.preBasicIV();
  this.closeArchiveReader();
  this.checkOutputFile();
}

Fixed version (ground truth):
/** 
 * @throws Exception
 */
public void testBasicIV5() throws Exception {
  this.GEN_add_filter=true;
  this.GEN_add_group=true;
  this.genBasicIV();
  this.closeArchiveWriter();
  DataEngineContext deContext2=newContext(DataEngineContext.MODE_UPDATE,fileName,fileName);
  myPreDataEngine=DataEngine.newDataEngine(deContext2);
  this.PRE_add_filter=true;
  this.PRE_add_sort=true;
  this.PRE_add_group=true;
  this.preBasicIV();
  this.closeArchiveReader();
  this.checkOutputFile();
}