nus-yam/ex-repair huggingface dataset:
Program: 74016
Project: 74016
Buggy source:
private Collection populateToList(IResultIterator iterator,ScalarParameterHandle parameter,SelectionFilter filter){
  ParameterHelper parameterHelper=new ParameterHelper(parameter,locale);
  Collection choices=parameterHelper.createSelectionCollection();
  int limit=parameter.getListlimit();
  try {
    while (iterator.next() && (limit <= 0 || choices.size() < limit)) {
      if (filter != null && !filter.accept(iterator)) {
        continue;
      }
      String label=parameterHelper.getLabel(iterator);
      Object value=parameterHelper.getValue(iterator);
      choices.add(new SelectionChoice(label,value));
    }
  }
 catch (  BirtException ex) {
    log.log(Level.WARNING,ex.getMessage(),ex);
    executionContext.addException(ex);
  }
  return choices;
}

Fixed version (ground truth):
private Collection populateToList(IResultIterator iterator,ScalarParameterHandle parameter,SelectionFilter filter){
  ParameterHelper parameterHelper=new ParameterHelper(parameter,locale);
  Collection choices=parameterHelper.createSelectionCollection();
  int limit=parameter.getListlimit();
  try {
    while (iterator.next() && (limit <= 0 || choices.size() < limit)) {
      if (filter != null && !filter.accept(iterator)) {
        continue;
      }
      String label=parameterHelper.getLabel(iterator);
      Object value=parameterHelper.getValue(iterator);
      choices.add(new SelectionChoice(label,value));
    }
  }
 catch (  BirtException ex) {
    log.log(Level.WARNING,ex.getMessage(),ex);
    executionContext.addException(parameter,ex);
  }
  return choices;
}
Program: 74017
Project: 74017
Buggy source:
private IResultIterator getResultSetForParameter(ScalarParameterHandle parameter){
  ReportDesignHandle report=(ReportDesignHandle)this.runnable.getDesignHandle();
  DataSetHandle dataSet=report.findDataSet(parameter.getDataSetName());
  IResultIterator iterator=null;
  if (dataSet != null) {
    try {
      QueryDefinition queryDefn=createQueryDefinition(dataSet);
      ParameterHelper.addParameterBinding(queryDefn,parameter);
      DataRequestSession dteSession=createDataSession(dataSet);
      iterator=executeQuery(dteSession,queryDefn);
    }
 catch (    BirtException ex) {
      log.log(Level.WARNING,ex.getMessage(),ex);
      executionContext.addException(ex);
    }
  }
  return iterator;
}

Fixed version (ground truth):
private IResultIterator getResultSetForParameter(ScalarParameterHandle parameter){
  ReportDesignHandle report=(ReportDesignHandle)this.runnable.getDesignHandle();
  DataSetHandle dataSet=report.findDataSet(parameter.getDataSetName());
  IResultIterator iterator=null;
  if (dataSet != null) {
    try {
      QueryDefinition queryDefn=createQueryDefinition(dataSet);
      ParameterHelper.addParameterBinding(queryDefn,parameter);
      DataRequestSession dteSession=createDataSession(dataSet);
      iterator=executeQuery(dteSession,queryDefn);
    }
 catch (    BirtException ex) {
      log.log(Level.WARNING,ex.getMessage(),ex);
      executionContext.addException(dataSet,ex);
    }
  }
  return iterator;
}
Program: 74018
Project: 74018
Buggy source:
private IResultIterator getResultSetOfCascadingGroup(CascadingParameterGroupHandle parameterGroup){
  if (parameterGroup == null)   return null;
  DataSetHandle dataSet=parameterGroup.getDataSet();
  if (dataSet != null) {
    try {
      QueryDefinition queryDefn=createQueryDefinition(dataSet);
      Iterator iter=parameterGroup.getParameters().iterator();
      while (iter.hasNext()) {
        Object parameter=iter.next();
        if (parameter instanceof ScalarParameterHandle) {
          ParameterHelper.addParameterBinding(queryDefn,(ScalarParameterHandle)parameter);
        }
      }
      DataRequestSession dteSession=createDataSession(dataSet);
      return executeQuery(dteSession,queryDefn);
    }
 catch (    BirtException ex) {
      log.log(Level.WARNING,ex.getMessage(),ex);
      executionContext.addException(ex);
    }
  }
  return null;
}

Fixed version (ground truth):
private IResultIterator getResultSetOfCascadingGroup(CascadingParameterGroupHandle parameterGroup){
  if (parameterGroup == null)   return null;
  DataSetHandle dataSet=parameterGroup.getDataSet();
  if (dataSet != null) {
    try {
      QueryDefinition queryDefn=createQueryDefinition(dataSet);
      Iterator iter=parameterGroup.getParameters().iterator();
      while (iter.hasNext()) {
        Object parameter=iter.next();
        if (parameter instanceof ScalarParameterHandle) {
          ParameterHelper.addParameterBinding(queryDefn,(ScalarParameterHandle)parameter);
        }
      }
      DataRequestSession dteSession=createDataSession(dataSet);
      return executeQuery(dteSession,queryDefn);
    }
 catch (    BirtException ex) {
      log.log(Level.WARNING,ex.getMessage(),ex);
      executionContext.addException(dataSet,ex);
    }
  }
  return null;
}
Program: 74019
Project: 74019
Buggy source:
private void handleOnPrepare(RowHandle handle){
  boolean hasJavaScript=(handle.getOnPrepare() != null) && (handle.getOnPrepare().length() != 0);
  boolean hasJavaCode=(handle.getEventHandlerClass() != null) && (handle.getEventHandlerClass().length() != 0);
  if (!hasJavaScript && !hasJavaCode)   return;
  executionContext.pushHandle(handle);
  if (hasJavaScript) {
    IDesignElement element=SimpleElementFactory.getInstance().getElement(handle);
    try {
      if (element != null) {
        executionContext.newScope(element);
      }
      if (handle.getOnPrepare() != null) {
        String scriptText=handle.getOnPrepare();
        if (null != scriptText) {
          String id=ModuleUtil.getScriptUID(handle.getPropertyHandle(ITableRowModel.ON_PREPARE_METHOD));
          ScriptExpression expr=new ScriptExpression(scriptText,id);
          executionContext.evaluate(expr);
        }
      }
      return;
    }
  finally {
      if (element != null) {
        executionContext.exitScope();
      }
    }
  }
  try {
    RowScriptExecutor.handleOnPrepare(handle,executionContext);
  }
  finally {
    executionContext.popHandle();
  }
}

Fixed version (ground truth):
private void handleOnPrepare(RowHandle handle){
  boolean hasJavaScript=(handle.getOnPrepare() != null) && (handle.getOnPrepare().length() != 0);
  boolean hasJavaCode=(handle.getEventHandlerClass() != null) && (handle.getEventHandlerClass().length() != 0);
  if (!hasJavaScript && !hasJavaCode)   return;
  executionContext.pushHandle(handle);
  if (hasJavaScript) {
    IDesignElement element=SimpleElementFactory.getInstance().getElement(handle);
    try {
      if (element != null) {
        executionContext.newScope(element);
      }
      if (handle.getOnPrepare() != null) {
        String scriptText=handle.getOnPrepare();
        if (null != scriptText) {
          String id=ModuleUtil.getScriptUID(handle.getPropertyHandle(ITableRowModel.ON_PREPARE_METHOD));
          ScriptExpression expr=new ScriptExpression(scriptText,id);
          executionContext.evaluate(expr);
        }
      }
      return;
    }
 catch (    BirtException ex) {
      executionContext.addException(handle,ex);
      return;
    }
 finally {
      if (element != null) {
        executionContext.exitScope();
      }
    }
  }
  try {
    RowScriptExecutor.handleOnPrepare(handle,executionContext);
  }
  finally {
    executionContext.popHandle();
  }
}
Program: 74020
Project: 74020
Buggy source:
abstract protected IBaseResultSet doExecuteQuery(IBaseResultSet parent,IQueryDefinition query,boolean useCache);

Fixed version (ground truth):
abstract protected IBaseResultSet doExecuteQuery(IBaseResultSet parent,IQueryDefinition query,boolean useCache) throws BirtException ;
Program: 74021
Project: 74021
Buggy source:
/** 
 * @param report
 * @param appContext
 */
protected void doPrepareQuery(Report report,Map appContext){
  this.appContext=appContext;
  List queries=report.getQueries();
  for (int i=0; i < queries.size(); i++) {
    IDataQueryDefinition query=(IDataQueryDefinition)queries.get(i);
    try {
      IBasePreparedQuery preparedQuery=dteSession.prepare(query,appContext);
      queryMap.put(query,preparedQuery);
    }
 catch (    BirtException e) {
      logger.log(Level.SEVERE,e.getMessage(),e);
      context.addException(e);
    }
  }
}

Fixed version (ground truth):
/** 
 * @param report
 * @param appContext
 */
protected void doPrepareQuery(Report report,Map appContext){
  this.appContext=appContext;
  List queries=report.getQueries();
  for (int i=0; i < queries.size(); i++) {
    IDataQueryDefinition query=(IDataQueryDefinition)queries.get(i);
    try {
      IBasePreparedQuery preparedQuery=dteSession.prepare(query,appContext);
      queryMap.put(query,preparedQuery);
    }
 catch (    BirtException e) {
      logger.log(Level.SEVERE,e.getMessage(),e);
      context.addException(report.getReportDesign(),e);
    }
  }
}
Program: 74022
Project: 74022
Buggy source:
abstract protected IBaseResultSet doExecuteCube(IBaseResultSet parent,ICubeQueryDefinition query,boolean useCache);

Fixed version (ground truth):
abstract protected IBaseResultSet doExecuteCube(IBaseResultSet parent,ICubeQueryDefinition query,boolean useCache) throws BirtException ;
Program: 74023
Project: 74023
Buggy source:
public IBaseResultSet execute(IBaseResultSet parent,IDataQueryDefinition query,boolean useCache) throws BirtException {
  if (query instanceof ISubqueryDefinition) {
    if (parent == null) {
      return null;
    }
 else     if (parent instanceof ICubeResultSet) {
      context.addException(new EngineException("String_Node_Str" + ((ISubqueryDefinition)query).getName()));
    }
    return doExecuteSubQuery((IQueryResultSet)parent,(ISubqueryDefinition)query);
  }
 else   if (query instanceof IQueryDefinition) {
    return doExecuteQuery(parent,(IQueryDefinition)query,useCache);
  }
 else   if (query instanceof ICubeQueryDefinition) {
    return doExecuteCube(parent,(ICubeQueryDefinition)query,useCache);
  }
  throw new EngineException("String_Node_Str" + query.getClass().getName());
}

Fixed version (ground truth):
public IBaseResultSet execute(IBaseResultSet parent,IDataQueryDefinition query,boolean useCache) throws BirtException {
  if (query instanceof ISubqueryDefinition) {
    if (parent == null) {
      return null;
    }
 else     if (parent instanceof ICubeResultSet) {
      throw new EngineException("String_Node_Str" + ((ISubqueryDefinition)query).getName());
    }
    return doExecuteSubQuery((IQueryResultSet)parent,(ISubqueryDefinition)query);
  }
 else   if (query instanceof IQueryDefinition) {
    return doExecuteQuery(parent,(IQueryDefinition)query,useCache);
  }
 else   if (query instanceof ICubeQueryDefinition) {
    return doExecuteCube(parent,(ICubeQueryDefinition)query,useCache);
  }
  throw new EngineException("String_Node_Str" + query.getClass().getName());
}
Program: 74024
Project: 74024
Buggy source:
public void skipTo(String cellIndex){
  try {
    CubeUtil.positionCursor(cube,cellIndex);
  }
 catch (  Exception e) {
    context.addException(new EngineException("String_Node_Str"));
  }
}

Fixed version (ground truth):
public void skipTo(String cellIndex) throws BirtException {
  try {
    CubeUtil.positionCursor(cube,cellIndex);
  }
 catch (  OLAPException e) {
    throw new EngineException("String_Node_Str",e);
  }
}
Program: 74025
Project: 74025
Buggy source:
/** 
 * save the meta information
 * @param parentResultSet
 * @param query
 * @param resultSet
 */
protected void storeMetaInfo(IBaseResultSet parentResultSet,IDataQueryDefinition query,IBaseResultSet resultSet){
  String pRsetId=null;
  String rowId="String_Node_Str";
  if (parentResultSet != null) {
    if (parentResultSet instanceof QueryResultSet) {
      pRsetId=((QueryResultSet)parentResultSet).getQueryResultsID();
    }
 else {
      pRsetId=((CubeResultSet)parentResultSet).getQueryResultsID();
    }
    try {
      rowId=parentResultSet.getRawID();
    }
 catch (    BirtException be) {
      logger.log(Level.SEVERE,be.getMessage());
      context.addException(be);
    }
  }
  String queryID=(String)queryIDMap.get(query);
  storeDteMetaInfo(pRsetId,rowId,queryID,resultSet.getQueryResults().getID());
}

Fixed version (ground truth):
/** 
 * save the meta information
 * @param parentResultSet
 * @param query
 * @param resultSet
 */
protected void storeMetaInfo(IBaseResultSet parentResultSet,IDataQueryDefinition query,IBaseResultSet resultSet) throws BirtException {
  String pRsetId=null;
  String rowId="String_Node_Str";
  if (parentResultSet != null) {
    if (parentResultSet instanceof QueryResultSet) {
      pRsetId=((QueryResultSet)parentResultSet).getQueryResultsID();
    }
 else {
      pRsetId=((CubeResultSet)parentResultSet).getQueryResultsID();
    }
    rowId=parentResultSet.getRawID();
  }
  String queryID=(String)queryIDMap.get(query);
  storeDteMetaInfo(pRsetId,rowId,queryID,resultSet.getQueryResults().getID());
}
Program: 74026
Project: 74026
Buggy source:
protected IBaseResultSet doExecuteQuery(IBaseResultSet parentResultSet,IQueryDefinition query,boolean useCache){
  IBaseResultSet resultSet=super.doExecuteQuery(parentResultSet,query,useCache);
  if (resultSet != null) {
    storeMetaInfo(parentResultSet,query,resultSet);
  }
  return resultSet;
}

Fixed version (ground truth):
protected IBaseResultSet doExecuteQuery(IBaseResultSet parentResultSet,IQueryDefinition query,boolean useCache) throws BirtException {
  IBaseResultSet resultSet=super.doExecuteQuery(parentResultSet,query,useCache);
  if (resultSet != null) {
    storeMetaInfo(parentResultSet,query,resultSet);
  }
  return resultSet;
}
Program: 74027
Project: 74027
Buggy source:
protected IBaseResultSet doExecuteCube(IBaseResultSet parentResultSet,ICubeQueryDefinition query,boolean useCache){
  IBaseResultSet resultSet=super.doExecuteCube(parentResultSet,query,useCache);
  if (resultSet != null) {
    storeMetaInfo(parentResultSet,query,resultSet);
  }
  return resultSet;
}

Fixed version (ground truth):
protected IBaseResultSet doExecuteCube(IBaseResultSet parentResultSet,ICubeQueryDefinition query,boolean useCache) throws BirtException {
  IBaseResultSet resultSet=super.doExecuteCube(parentResultSet,query,useCache);
  if (resultSet != null) {
    storeMetaInfo(parentResultSet,query,resultSet);
  }
  return resultSet;
}
Program: 74030
Project: 74030
Buggy source:
/** 
 * @param expr
 * @param bindings
 * @param onlyFromDirectReferenceExpr
 * @return
 * @throws DataException
 */
private static Set getReferencedDimLevel(IScriptExpression expr,List bindings,boolean onlyFromDirectReferenceExpr) throws DataException {
  if (expr == null)   return new HashSet();
  if (expr.getText() == null || expr.getText().length() == 0)   throw new DataException(ResourceConstants.DATA_BINDING_EXPRESSION_EMPTY);
  try {
    Set result=new HashSet();
    Context cx=Context.enter();
    CompilerEnvirons ce=new CompilerEnvirons();
    Parser p=new Parser(ce,cx.getErrorReporter());
    ScriptOrFnNode tree=p.parse(expr.getText(),null,0);
    populateDimLevels(null,tree,result,bindings,onlyFromDirectReferenceExpr);
    return result;
  }
  finally {
    Context.exit();
  }
}

Fixed version (ground truth):
/** 
 * @param expr
 * @param bindings
 * @param onlyFromDirectReferenceExpr
 * @return
 * @throws DataException
 */
private static Set getReferencedDimLevel(IScriptExpression expr,List bindings,boolean onlyFromDirectReferenceExpr) throws DataException {
  if (expr == null || expr.getText() == null || expr.getText().length() == 0)   return new HashSet();
  try {
    Set result=new HashSet();
    Context cx=Context.enter();
    CompilerEnvirons ce=new CompilerEnvirons();
    Parser p=new Parser(ce,cx.getErrorReporter());
    ScriptOrFnNode tree=p.parse(expr.getText(),null,0);
    populateDimLevels(null,tree,result,bindings,onlyFromDirectReferenceExpr);
    return result;
  }
  finally {
    Context.exit();
  }
}
Program: 74032
Project: 74032
Buggy source:
public IReportItemExecutor getNextChild(){
  IReportItemExecutor nextExecutor=null;
  if (currentGroupIndex < columnGroups.size()) {
    EdgeGroup eg=(EdgeGroup)columnGroups.get(currentGroupIndex++);
    DimensionViewHandle dv=crosstabItem.getDimension(COLUMN_AXIS_TYPE,eg.dimensionIndex);
    LevelViewHandle lv=dv.getLevel(eg.levelIndex);
    nextExecutor=new CrosstabHeaderRowExecutor(this,lv);
  }
 else   if (hasMeasureHeader) {
    nextExecutor=new CrosstabMeasureHeaderRowExecutor(this);
    hasMeasureHeader=false;
  }
  return nextExecutor;
}

Fixed version (ground truth):
public IReportItemExecutor getNextChild(){
  IReportItemExecutor nextExecutor=null;
  if (currentGroupIndex < columnGroups.size()) {
    EdgeGroup eg=(EdgeGroup)columnGroups.get(currentGroupIndex++);
    DimensionViewHandle dv=crosstabItem.getDimension(COLUMN_AXIS_TYPE,eg.dimensionIndex);
    LevelViewHandle lv=dv.getLevel(eg.levelIndex);
    nextExecutor=new CrosstabHeaderRowExecutor(this,lv);
  }
 else   if (hasMeasureHeader) {
    nextExecutor=new CrosstabMeasureHeaderRowExecutor(this);
    hasMeasureHeader=false;
  }
 else   if (useCornerHeader) {
    nextExecutor=new CrosstabCornerHeaderRowExecutor(this);
    useCornerHeader=false;
  }
  return nextExecutor;
}
Program: 74033
Project: 74033
Buggy source:
private void prepareChildren(){
  currentGroupIndex=0;
  hasMeasureHeader=GroupUtil.hasMeasureHeader(crosstabItem,COLUMN_AXIS_TYPE);
}

Fixed version (ground truth):
private void prepareChildren(){
  currentGroupIndex=0;
  hasMeasureHeader=GroupUtil.hasMeasureHeader(crosstabItem,COLUMN_AXIS_TYPE);
  useCornerHeader=columnGroups.size() == 0 && !hasMeasureHeader && crosstabItem.getHeader() != null;
}
Program: 74034
Project: 74034
Buggy source:
public boolean hasNextChild(){
  if (currentGroupIndex < columnGroups.size()) {
    return true;
  }
  if (hasMeasureHeader) {
    return true;
  }
  return false;
}

Fixed version (ground truth):
public boolean hasNextChild(){
  if (currentGroupIndex < columnGroups.size()) {
    return true;
  }
  if (hasMeasureHeader) {
    return true;
  }
  if (useCornerHeader) {
    return true;
  }
  return false;
}
Program: 74035
Project: 74035
Buggy source:
private void collectExecutable() throws OLAPException {
  endOfGroups=false;
  currentChild=0;
  children=new ArrayList();
  int startingGroupIndex=getStartingGroupLevel(rowCursor,groupCursors);
  if (startingGroupIndex <= 0) {
    if (columnGroups.size() > 0 || GroupUtil.hasMeasureHeader(crosstabItem,COLUMN_AXIS_TYPE)) {
      CrosstabHeaderExecutor headerExecutor=new CrosstabHeaderExecutor(this);
      children.add(headerExecutor);
    }
  }
{
    CrosstabGroupExecutor groupExecutor=new CrosstabGroupExecutor(this,0,rowCursor);
    children.add(groupExecutor);
  }
  int endingGroupIndex=getEndingGroupLevel(rowCursor,groupCursors);
  if (endingGroupIndex <= 0) {
    if (crosstabItem.getGrandTotal(ROW_AXIS_TYPE) != null && (measureCount > 0 || !IColumnWalker.IGNORE_TOTAL_COLUMN_WITHOUT_MEASURE)) {
      CrosstabFooterExecutor totalExecutor=new CrosstabFooterExecutor(this);
      children.add(totalExecutor);
    }
    endOfGroups=true;
  }
}

Fixed version (ground truth):
private void collectExecutable() throws OLAPException {
  endOfGroups=false;
  currentChild=0;
  children=new ArrayList();
  int startingGroupIndex=getStartingGroupLevel(rowCursor,groupCursors);
  if (startingGroupIndex <= 0) {
    if (columnGroups.size() > 0 || GroupUtil.hasMeasureHeader(crosstabItem,COLUMN_AXIS_TYPE) || crosstabItem.getHeader() != null) {
      CrosstabHeaderExecutor headerExecutor=new CrosstabHeaderExecutor(this);
      children.add(headerExecutor);
    }
  }
{
    CrosstabGroupExecutor groupExecutor=new CrosstabGroupExecutor(this,0,rowCursor);
    children.add(groupExecutor);
  }
  int endingGroupIndex=getEndingGroupLevel(rowCursor,groupCursors);
  if (endingGroupIndex <= 0) {
    if (crosstabItem.getGrandTotal(ROW_AXIS_TYPE) != null && (measureCount > 0 || !IColumnWalker.IGNORE_TOTAL_COLUMN_WITHOUT_MEASURE)) {
      CrosstabFooterExecutor totalExecutor=new CrosstabFooterExecutor(this);
      children.add(totalExecutor);
    }
    endOfGroups=true;
  }
}
Program: 74036
Project: 74036
Buggy source:
public IStructure createInstance(Object[] fields){
  Object[][] objectArrays=ObjectArrayUtil.convert(fields);
  Row4Aggregation result=new Row4Aggregation();
  result.setLevelMembers(new Member[objectArrays.length - 1]);
  for (int i=0; i < result.getLevelMembers().length; i++) {
    result.getLevelMembers()[i]=(Member)levelMemberCreator.createInstance(objectArrays[i]);
  }
  result.setMeasures(objectArrays[objectArrays.length - 2]);
  result.setParameterValues(objectArrays[objectArrays.length - 1]);
  return result;
}

Fixed version (ground truth):
public IStructure createInstance(Object[] fields){
  Object[][] objectArrays=ObjectArrayUtil.convert(fields);
  Row4Aggregation result=new Row4Aggregation();
  result.setLevelMembers(new Member[objectArrays.length - 2]);
  for (int i=0; i < result.getLevelMembers().length; i++) {
    result.getLevelMembers()[i]=(Member)levelMemberCreator.createInstance(objectArrays[i]);
  }
  result.setMeasures(objectArrays[objectArrays.length - 2]);
  result.setParameterValues(objectArrays[objectArrays.length - 1]);
  return result;
}
Program: 74038
Project: 74038
Buggy source:
/** 
 * When mode is MODE_GENERATION, the writer stream of archive will be used. When mode is MODE_PRESENTATION, the reader stream of archive will be used. When mode is DIRECT_PRESENTATION, the archive will not be used. When mode is PRESENTATION_AND_GENERATION, both the write stream and the read  steram of archive will be used. 
 * @param mode
 * @param scope
 * @param reader
 * @param writer
 * @return an instance of DataEngineContext
 */
public static DataEngineContext newInstance(int mode,Scriptable scope,IDocArchiveReader reader,IDocArchiveWriter writer) throws BirtException {
  return new DataEngineContext(mode,scope,reader,writer);
}

Fixed version (ground truth):
/** 
 * @param mode
 * @param scope
 * @param reader
 * @param writer
 * @param useDatasetCache
 * @return
 * @throws BirtException
 */
public static DataEngineContext newInstance(int mode,Scriptable scope,IDocArchiveReader reader,IDocArchiveWriter writer,boolean useDteLevelDatasetCache) throws BirtException {
  return new DataEngineContext(mode,scope,reader,writer,useDteLevelDatasetCache);
}
Program: 74039
Project: 74039
Buggy source:
/** 
 * construction
 */
CacheMapManager(String tempDir){
  this.tempDir=tempDir;
}

Fixed version (ground truth):
/** 
 * construction
 */
CacheMapManager(String tempDir,boolean useJVMLevelCache){
  this.tempDir=tempDir;
  if (useJVMLevelCache) {
    this.cacheMap=jvmCacheMap;
  }
 else {
    this.cacheMap=new HashMap();
  }
}
Program: 74040
Project: 74040
Buggy source:
/** 
 * Reset for test case
 */
void resetForTest(){
synchronized (this) {
    cacheMap=new HashMap();
  }
}

Fixed version (ground truth):
/** 
 * Reset for test case
 */
void resetForTest(){
synchronized (this) {
    cacheMap.clear();
  }
}
Program: 74041
Project: 74041
Buggy source:
/** 
 * Construction
 */
public DataSetCacheManager(String tempDir,DataEngine dataEngine){
  this.tempDir=tempDir;
  this.dataSourceDesign=null;
  this.dataSetDesign=null;
  this.cacheOption=DataEngineContext.CACHE_USE_DEFAULT;
  this.alwaysCacheRowCount=0;
  this.cacheMapManager=new CacheMapManager(tempDir);
  this.mode=DataEngineContext.CACHE_MODE_IN_DISK;
}

Fixed version (ground truth):
/** 
 * Construction
 */
public DataSetCacheManager(String tempDir,DataEngine dataEngine,boolean useJVMLevelCache){
  this.tempDir=tempDir;
  this.dataSourceDesign=null;
  this.dataSetDesign=null;
  this.cacheOption=DataEngineContext.CACHE_USE_DEFAULT;
  this.alwaysCacheRowCount=0;
  this.cacheMapManager=new CacheMapManager(tempDir,useJVMLevelCache);
  this.mode=DataEngineContext.CACHE_MODE_IN_DISK;
}
Program: 74042
Project: 74042
Buggy source:
/** 
 * Constructor.
 * @param engine
 */
public DataEngineSession(DataEngineImpl engine){
  Object[] params={engine};
  logger.entering(DataEngineSession.class.getName(),"String_Node_Str",params);
  this.context=new HashMap();
  this.engine=engine;
  this.scope=engine.getContext().getJavaScriptScope();
  Context cx=Context.enter();
  if (this.scope == null) {
    this.scope=new ImporterTopLevel(cx);
  }
  new CoreJavaScriptInitializer().initialize(cx,scope);
  Context.exit();
  tempDir=engine.getContext().getTmpdir() + "String_Node_Str" + engine.hashCode();
  File f=new File(tempDir);
  if (!f.exists() || !f.isDirectory()) {
    f.mkdir();
  }
  tempDir+=File.separator;
  this.dataSetCacheManager=new DataSetCacheManager(tempDir,engine);
  logger.exiting(DataEngineSession.class.getName(),"String_Node_Str");
}

Fixed version (ground truth):
/** 
 * Constructor.
 * @param engine
 */
public DataEngineSession(DataEngineImpl engine){
  Object[] params={engine};
  logger.entering(DataEngineSession.class.getName(),"String_Node_Str",params);
  this.context=new HashMap();
  this.engine=engine;
  this.scope=engine.getContext().getJavaScriptScope();
  Context cx=Context.enter();
  if (this.scope == null) {
    this.scope=new ImporterTopLevel(cx);
  }
  new CoreJavaScriptInitializer().initialize(cx,scope);
  Context.exit();
  tempDir=engine.getContext().getTmpdir() + "String_Node_Str" + engine.hashCode();
  File f=new File(tempDir);
  if (!f.exists() || !f.isDirectory()) {
    f.mkdir();
  }
  tempDir+=File.separator;
  this.dataSetCacheManager=new DataSetCacheManager(tempDir,engine,!engine.getContext().useDatasetCache());
  logger.exiting(DataEngineSession.class.getName(),"String_Node_Str");
}
Program: 74043
Project: 74043
Buggy source:
/** 
 * @param outerResults
 * @param scope
 * @return
 * @throws DataException
 */
public IQueryResults execute(IBaseQueryResults outerResults,Scriptable scope) throws DataException {
  this.configureDataSetCache(queryDefn,appContext,scope != null ? scope : dataEngine.getSession().getSharedScope());
  return preparedQuery.doPrepare(outerResults,scope,newExecutor(),this);
}

Fixed version (ground truth):
/** 
 * @param outerResults
 * @param scope
 * @return
 * @throws DataException
 */
public IQueryResults execute(IBaseQueryResults outerResults,Scriptable scope) throws DataException {
  this.configureDataSetCache(queryDefn,appContext,scope != null ? scope : dataEngine.getSession().getSharedScope());
  initializeExecution(outerResults,scope);
  return preparedQuery.doPrepare(outerResults,scope,newExecutor(),this);
}
Program: 74044
Project: 74044
Buggy source:
public IQueryResults execute(IQueryResults outerResults,Scriptable scope) throws DataException {
  this.configureParameterHints(queryDefn,appContext,scope);
  return super.execute(outerResults,scope);
}

Fixed version (ground truth):
public IQueryResults execute(IBaseQueryResults outerResults,Scriptable scope) throws DataException {
  this.initializeExecution(outerResults,scope);
  return super.execute(outerResults,scope);
}
Program: 74046
Project: 74046
Buggy source:
protected IBaseResultSet doExecuteCube(IBaseResultSet parentResult,ICubeQueryDefinition query,boolean useCache){
  String queryID=(String)queryIDMap.get(query);
  try {
    String resultSetID=loadResultSetID(parentResult,queryID);
    IBaseQueryResults queryResults=null;
    query.setQueryResultsID(resultSetID);
    IBasePreparedQuery pQuery=dteSession.prepare(query,context.getAppContext());
    if (parentResult != null) {
      queryResults=dteSession.execute(pQuery,parentResult.getQueryResults(),context.getSharedScope());
    }
 else {
      queryResults=dteSession.execute(pQuery,null,context.getSharedScope());
    }
    CubeResultSet resultSet=null;
    if (parentResult == null) {
      resultSet=new CubeResultSet(this,context,query,(ICubeQueryResults)queryResults);
    }
 else {
      resultSet=new CubeResultSet(this,context,resultSet,query,(ICubeQueryResults)queryResults);
    }
    return resultSet;
  }
 catch (  BirtException be) {
    logger.log(Level.SEVERE,be.getMessage());
    context.addException(be);
    return null;
  }
}

Fixed version (ground truth):
protected IBaseResultSet doExecuteCube(IBaseResultSet parentResult,ICubeQueryDefinition query,boolean useCache){
  String queryID=(String)queryIDMap.get(query);
  try {
    String resultSetID=loadResultSetID(parentResult,queryID);
    IBaseQueryResults queryResults=null;
    query.setQueryResultsID(resultSetID);
    IBasePreparedQuery pQuery=dteSession.prepare(query,context.getAppContext());
    if (parentResult != null) {
      queryResults=dteSession.execute(pQuery,parentResult.getQueryResults(),context.getSharedScope());
    }
 else {
      queryResults=dteSession.execute(pQuery,null,context.getSharedScope());
    }
    CubeResultSet resultSet=null;
    if (parentResult == null) {
      resultSet=new CubeResultSet(this,context,query,(ICubeQueryResults)queryResults);
    }
 else {
      resultSet=new CubeResultSet(this,context,parentResult,query,(ICubeQueryResults)queryResults);
    }
    return resultSet;
  }
 catch (  BirtException be) {
    logger.log(Level.SEVERE,be.getMessage());
    context.addException(be);
    return null;
  }
}
Program: 74048
Project: 74048
Buggy source:
public void execute(final IProgressMonitor monitor) throws CoreException, InvocationTargetException, InterruptedException {
  try {
    if (!input.exists()) {
    }
    doSave(monitor);
  }
 catch (  Exception e) {
    ExceptionHandler.handle(e);
  }
}

Fixed version (ground truth):
public void execute(final IProgressMonitor monitor) throws CoreException, InvocationTargetException, InterruptedException {
  try {
    if (!input.exists()) {
    }
    IReportProvider provider=getProvider();
    if (provider != null) {
      provider.saveReport(getModel(),getEditorInput(),origReportPath,monitor);
      firePropertyChange(PROP_DIRTY);
    }
  }
 catch (  Exception e) {
    ExceptionHandler.handle(e);
  }
}
Program: 74049
Project: 74049
Buggy source:
private void saveFile(final ModuleHandle moduleHandle,final File file,IProgressMonitor monitor){
  IRunnableWithProgress op=new IRunnableWithProgress(){
    public synchronized final void run(    IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
      try {
        IWorkspaceRunnable workspaceRunnable=new IWorkspaceRunnable(){
          public void run(          IProgressMonitor pm) throws CoreException {
            try {
              execute(pm);
            }
 catch (            CoreException e) {
              throw e;
            }
catch (            IOException e) {
              ExceptionHandler.handle(e);
            }
          }
        }
;
        ResourcesPlugin.getWorkspace().run(workspaceRunnable,ResourcesPlugin.getWorkspace().getRoot(),IResource.NONE,monitor);
      }
 catch (      CoreException e) {
        throw new InvocationTargetException(e);
      }
catch (      OperationCanceledException e) {
        throw new InterruptedException(e.getMessage());
      }
    }
    public void execute(    final IProgressMonitor monitor) throws CoreException, IOException {
      if (file.exists() || file.createNewFile()) {
        FileOutputStream out=new FileOutputStream(file);
        moduleHandle.serialize(out);
        out.close();
      }
    }
  }
;
  try {
    new ProgressMonitorDialog(UIUtil.getDefaultShell()).run(false,true,op);
  }
 catch (  Exception e) {
    ExceptionHandler.handle(e);
  }
}

Fixed version (ground truth):
private void saveFile(final ModuleHandle moduleHandle,final File file,final IPath oldReportPath,IProgressMonitor monitor){
  IRunnableWithProgress op=new IRunnableWithProgress(){
    public synchronized final void run(    IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
      try {
        IWorkspaceRunnable workspaceRunnable=new IWorkspaceRunnable(){
          public void run(          IProgressMonitor pm) throws CoreException {
            try {
              execute(pm);
            }
 catch (            CoreException e) {
              throw e;
            }
catch (            IOException e) {
              ExceptionHandler.handle(e);
            }
          }
        }
;
        ResourcesPlugin.getWorkspace().run(workspaceRunnable,ResourcesPlugin.getWorkspace().getRoot(),IResource.NONE,monitor);
      }
 catch (      CoreException e) {
        throw new InvocationTargetException(e);
      }
catch (      OperationCanceledException e) {
        throw new InterruptedException(e.getMessage());
      }
    }
    public void execute(    final IProgressMonitor monitor) throws CoreException, IOException {
      if (file.exists() || file.createNewFile()) {
        FileOutputStream out=new FileOutputStream(file);
        moduleHandle.serialize(out);
        out.close();
        if (oldReportPath != null) {
          copyReportConfigFile(new Path(file.getAbsolutePath()),oldReportPath);
        }
      }
    }
  }
;
  try {
    new ProgressMonitorDialog(UIUtil.getDefaultShell()).run(false,true,op);
  }
 catch (  Exception e) {
    ExceptionHandler.handle(e);
  }
}
Program: 74050
Project: 74050
Buggy source:
public void saveReport(ModuleHandle moduleHandle,Object element,IProgressMonitor monitor){
  if (element instanceof IPathEditorInput) {
    IPathEditorInput input=(IPathEditorInput)element;
    saveFile(moduleHandle,input.getPath().toFile(),monitor);
  }
}

Fixed version (ground truth):
public void saveReport(ModuleHandle moduleHandle,Object element,IPath origReportPath,IProgressMonitor monitor){
  if (element instanceof IPathEditorInput) {
    IPathEditorInput input=(IPathEditorInput)element;
    saveFile(moduleHandle,input.getPath().toFile(),origReportPath,monitor);
  }
}
Program: 74051
Project: 74051
Buggy source:
public void execute(final IProgressMonitor monitor) throws CoreException, IOException {
  if (file.exists() || file.createNewFile()) {
    FileOutputStream out=new FileOutputStream(file);
    moduleHandle.serialize(out);
    out.close();
  }
}

Fixed version (ground truth):
public void execute(final IProgressMonitor monitor) throws CoreException, IOException {
  if (file.exists() || file.createNewFile()) {
    FileOutputStream out=new FileOutputStream(file);
    moduleHandle.serialize(out);
    out.close();
    if (oldReportPath != null) {
      copyReportConfigFile(new Path(file.getAbsolutePath()),oldReportPath);
    }
  }
}
Program: 74052
Project: 74052
Buggy source:
/** 
 * Save moduleHandle to the orginal input.
 * @param moduleHandle
 * @param element input element.
 * @param monitor
 */
void saveReport(ModuleHandle moduleHandle,Object element,IProgressMonitor monitor);

Fixed version (ground truth):
/** 
 * Saves moduleHandle to the current input.
 * @param moduleHandle The specified module handle which provides the common functionalities of report design and library.
 * @param element input element.
 * @param origReportPath The path of original report.
 * @param monitor the progress monitor to use to display progress and receive requests for cancelation.
 */
void saveReport(ModuleHandle moduleHandle,Object element,IPath origReportPath,IProgressMonitor monitor);
Program: 74053
Project: 74053
Buggy source:
public void startLabel(ILabelContent label){
  Object design=label.getGenerateBy();
  IContent container=label;
  while (design == null) {
    container=(IContent)container.getParent();
    design=((IContent)container).getGenerateBy();
  }
  HyperlinkDef url=parseHyperLink(label);
  if (!("String_Node_Str".equalsIgnoreCase(label.getText()) && container instanceof IForeignContent)) {
    engine.addData(label.getText(),label.getComputedStyle(),url);
  }
}

Fixed version (ground truth):
public void startLabel(ILabelContent label){
  Object design=label.getGenerateBy();
  IContent container=label;
  while (design == null) {
    container=(IContent)container.getParent();
    design=((IContent)container).getGenerateBy();
  }
  HyperlinkDef url=parseHyperLink(label);
  BookmarkDef bookmark=getBookmark(label);
  if (!("String_Node_Str".equalsIgnoreCase(label.getText()) && container instanceof IForeignContent)) {
    engine.addData(label.getText(),label.getComputedStyle(),url,bookmark);
  }
}
Program: 74054
Project: 74054
Buggy source:
public void end(IReportContent report){
  engine.complete();
  ExcelWriter writer=new ExcelWriter(out);
  writer.writeDeclarations();
  writer.declareStyles(engine.getStyleMap());
  writer.startSheet();
  writer.startTable(engine.getCoordinates());
  int count=0;
  while (count < engine.getRowCount()) {
    outputData(engine.getRow(count),writer);
    count++;
  }
  writer.endTable();
  writer.closeSheet();
  for (int i=0; i < charts.size(); i++) {
    File temp=(File)charts.get(i);
    writer.insertSheet(temp);
    temp.delete();
  }
  writer.close(true);
}

Fixed version (ground truth):
public void end(IReportContent report){
  engine.complete();
  ExcelWriter writer=new ExcelWriter(out);
  writer.writeDeclarations();
  writer.declareStyles(engine.getStyleMap());
  writer.defineNames(engine.getNamesRefer());
  writer.startSheet();
  writer.startTable(engine.getCoordinates());
  int count=0;
  while (count < engine.getRowCount()) {
    outputData(engine.getRow(count),writer);
    count++;
  }
  writer.endTable();
  writer.closeSheet();
  writer.close(true);
}
Program: 74055
Project: 74055
Buggy source:
public void startImage(IImageContent image){
  if (image.getGenerateBy() instanceof ExtendedItemDesign) {
    ExtendedItemDesign eitem=(ExtendedItemDesign)image.getGenerateBy();
    ExtendedItemHandle handle=(ExtendedItemHandle)eitem.getHandle();
    String tagName=handle.getExtensionName();
    if ("String_Node_Str".equalsIgnoreCase(tagName)) {
      File res=chartConverter.convert(eitem,handle);
      if (res != null) {
        charts.add(res);
      }
    }
  }
}

Fixed version (ground truth):
public void startImage(IImageContent image){
}
Program: 74056
Project: 74056
Buggy source:
public void startData(IDataContent data){
  super.startData(data);
  HyperlinkDef url=parseHyperLink(data);
  if (((StyledElementDesign)data.getGenerateBy()).getMap() != null && ((StyledElementDesign)data.getGenerateBy()).getMap().getRuleCount() > 0) {
    engine.addData(data.getText().trim(),data.getComputedStyle(),url);
  }
 else   if (!ExcelUtil.getType(data.getValue()).equals(Data.NUMBER) && !ExcelUtil.getType(data.getValue()).equals(Data.DATE)) {
    engine.addData(data.getText(),data.getComputedStyle(),url);
  }
 else {
    engine.addData(data.getValue(),data.getComputedStyle(),url);
  }
}

Fixed version (ground truth):
public void startData(IDataContent data){
  super.startData(data);
  HyperlinkDef url=parseHyperLink(data);
  BookmarkDef bookmark=getBookmark(data);
  if (((StyledElementDesign)data.getGenerateBy()).getMap() != null && ((StyledElementDesign)data.getGenerateBy()).getMap().getRuleCount() > 0) {
    engine.addData(data.getText().trim(),data.getComputedStyle(),url,bookmark);
  }
 else   if (!ExcelUtil.getType(data.getValue()).equals(Data.NUMBER) && !ExcelUtil.getType(data.getValue()).equals(Data.DATE)) {
    engine.addData(data.getText(),data.getComputedStyle(),url,bookmark);
  }
 else {
    engine.addData(data.getValue(),data.getComputedStyle(),url,bookmark);
  }
}
Program: 74057
Project: 74057
Buggy source:
public void startAutoText(IAutoTextContent autoText){
  HyperlinkDef link=parseHyperLink(autoText);
  engine.addData(autoText.getText(),autoText.getComputedStyle(),link);
}

Fixed version (ground truth):
public void startAutoText(IAutoTextContent autoText){
  HyperlinkDef link=parseHyperLink(autoText);
  BookmarkDef bookmark=getBookmark(autoText);
  engine.addData(autoText.getText(),autoText.getComputedStyle(),link,bookmark);
}
Program: 74058
Project: 74058
Buggy source:
public void startList(IListContent list){
  Rule rule=engine.getCurrentContainer().getRule();
  TableInfo table=LayoutUtil.createTable(list,rule.getWidth());
  engine.addTable(table,list.getComputedStyle());
  if (list.getChildren() == null) {
    HyperlinkDef link=parseHyperLink(list);
    engine.addData(ExcelLayoutEngine.EMPTY,list.getComputedStyle(),link);
  }
}

Fixed version (ground truth):
public void startList(IListContent list){
  Rule rule=engine.getCurrentContainer().getRule();
  TableInfo table=LayoutUtil.createTable(list,rule.getWidth());
  engine.addTable(table,list.getComputedStyle());
  if (list.getChildren() == null) {
    HyperlinkDef link=parseHyperLink(list);
    BookmarkDef bookmark=getBookmark(list);
    engine.addData(ExcelLayoutEngine.EMPTY,list.getComputedStyle(),link,bookmark);
  }
}
Program: 74059
Project: 74059
Buggy source:
private HyperlinkDef parseHyperLink(IContent content){
  IHyperlinkAction linkaction=content.getHyperlinkAction();
  if (linkaction != null) {
    if (linkaction.getType() == IHyperlinkAction.ACTION_BOOKMARK) {
      return new HyperlinkDef(linkaction.getBookmark().replaceAll("String_Node_Str","String_Node_Str"),IHyperlinkAction.ACTION_BOOKMARK,null);
    }
 else     if (linkaction.getType() == IHyperlinkAction.ACTION_HYPERLINK) {
      return new HyperlinkDef(linkaction.getHyperlink(),IHyperlinkAction.ACTION_HYPERLINK,null);
    }
 else     if (linkaction.getType() == IHyperlinkAction.ACTION_DRILLTHROUGH) {
      Action act=new Action(linkaction);
      IHTMLActionHandler actionHandler=null;
      Object ac=service.getOption(IRenderOption.ACTION_HANDLER);
      if (ac != null && ac instanceof IHTMLActionHandler) {
        actionHandler=(IHTMLActionHandler)ac;
        return new HyperlinkDef(actionHandler.getURL(act,service.getReportContext()),IHyperlinkAction.ACTION_DRILLTHROUGH,null);
      }
    }
  }
 else   if (getBookMark(content) != null) {
    return getBookMark(content);
  }
  return null;
}

Fixed version (ground truth):
private HyperlinkDef parseHyperLink(IContent content){
  IHyperlinkAction linkaction=content.getHyperlinkAction();
  if (linkaction != null) {
    if (linkaction.getType() == IHyperlinkAction.ACTION_BOOKMARK) {
      return new HyperlinkDef(linkaction.getBookmark().replaceAll("String_Node_Str","String_Node_Str"),IHyperlinkAction.ACTION_BOOKMARK,null);
    }
 else     if (linkaction.getType() == IHyperlinkAction.ACTION_HYPERLINK) {
      return new HyperlinkDef(linkaction.getHyperlink(),IHyperlinkAction.ACTION_HYPERLINK,null);
    }
 else     if (linkaction.getType() == IHyperlinkAction.ACTION_DRILLTHROUGH) {
      Action act=new Action(linkaction);
      IHTMLActionHandler actionHandler=null;
      Object ac=service.getOption(IRenderOption.ACTION_HANDLER);
      if (ac != null && ac instanceof IHTMLActionHandler) {
        actionHandler=(IHTMLActionHandler)ac;
        return new HyperlinkDef(actionHandler.getURL(act,service.getReportContext()),IHyperlinkAction.ACTION_DRILLTHROUGH,null);
      }
    }
  }
  return null;
}
Program: 74060
Project: 74060
Buggy source:
public static boolean isNumber(String val){
  NumberFormat nf=NumberFormat.getInstance();
  try {
    Number num=nf.parse(val);
    return true;
  }
 catch (  Exception e) {
    return false;
  }
}

Fixed version (ground truth):
public static boolean isNumber(String val){
  NumberFormat nf=NumberFormat.getInstance();
  try {
    nf.parse(val);
    return true;
  }
 catch (  Exception e) {
    return false;
  }
}
Program: 74062
Project: 74062
Buggy source:
/** 
 * @param mode
 * @param scope
 * @param reader
 * @param writer
 * @param useDatasetCache
 * @return
 * @throws BirtException
 */
public static DataEngineContext newInstance(int mode,Scriptable scope,IDocArchiveReader reader,IDocArchiveWriter writer,boolean useDteLevelDatasetCache) throws BirtException {
  return new DataEngineContext(mode,scope,reader,writer,useDteLevelDatasetCache);
}

Fixed version (ground truth):
/** 
 * When mode is MODE_GENERATION, the writer stream of archive will be used. When mode is MODE_PRESENTATION, the reader stream of archive will be used. When mode is DIRECT_PRESENTATION, the archive will not be used. When mode is PRESENTATION_AND_GENERATION, both the write stream and the read  steram of archive will be used. 
 * @param mode
 * @param scope
 * @param reader
 * @param writer
 * @return an instance of DataEngineContext
 */
public static DataEngineContext newInstance(int mode,Scriptable scope,IDocArchiveReader reader,IDocArchiveWriter writer) throws BirtException {
  return new DataEngineContext(mode,scope,reader,writer);
}
Program: 74063
Project: 74063
Buggy source:
/** 
 * construction
 */
CacheMapManager(String tempDir,boolean useJVMLevelCache){
  this.tempDir=tempDir;
  if (useJVMLevelCache) {
    this.cacheMap=jvmCacheMap;
  }
 else {
    this.cacheMap=new HashMap();
  }
}

Fixed version (ground truth):
/** 
 * construction
 */
CacheMapManager(String tempDir){
  this.tempDir=tempDir;
}
Program: 74064
Project: 74064
Buggy source:
/** 
 * Reset for test case
 */
void resetForTest(){
synchronized (this) {
    cacheMap.clear();
  }
}

Fixed version (ground truth):
/** 
 * Reset for test case
 */
void resetForTest(){
synchronized (this) {
    cacheMap=new HashMap();
  }
}
Program: 74065
Project: 74065
Buggy source:
/** 
 * Construction
 */
public DataSetCacheManager(String tempDir,DataEngine dataEngine,boolean useJVMLevelCache){
  this.tempDir=tempDir;
  this.dataSourceDesign=null;
  this.dataSetDesign=null;
  this.cacheOption=DataEngineContext.CACHE_USE_DEFAULT;
  this.alwaysCacheRowCount=0;
  this.cacheMapManager=new CacheMapManager(tempDir,useJVMLevelCache);
  this.mode=DataEngineContext.CACHE_MODE_IN_DISK;
}

Fixed version (ground truth):
/** 
 * Construction
 */
public DataSetCacheManager(String tempDir,DataEngine dataEngine){
  this.tempDir=tempDir;
  this.dataSourceDesign=null;
  this.dataSetDesign=null;
  this.cacheOption=DataEngineContext.CACHE_USE_DEFAULT;
  this.alwaysCacheRowCount=0;
  this.cacheMapManager=new CacheMapManager(tempDir);
  this.mode=DataEngineContext.CACHE_MODE_IN_DISK;
}
Program: 74066
Project: 74066
Buggy source:
/** 
 * Constructor.
 * @param engine
 */
public DataEngineSession(DataEngineImpl engine){
  Object[] params={engine};
  logger.entering(DataEngineSession.class.getName(),"String_Node_Str",params);
  this.context=new HashMap();
  this.engine=engine;
  this.scope=engine.getContext().getJavaScriptScope();
  Context cx=Context.enter();
  if (this.scope == null) {
    this.scope=new ImporterTopLevel(cx);
  }
  new CoreJavaScriptInitializer().initialize(cx,scope);
  Context.exit();
  tempDir=engine.getContext().getTmpdir() + "String_Node_Str" + engine.hashCode();
  File f=new File(tempDir);
  if (!f.exists() || !f.isDirectory()) {
    f.mkdir();
  }
  tempDir+=File.separator;
  this.dataSetCacheManager=new DataSetCacheManager(tempDir,engine,!engine.getContext().useDatasetCache());
  logger.exiting(DataEngineSession.class.getName(),"String_Node_Str");
}

Fixed version (ground truth):
/** 
 * Constructor.
 * @param engine
 */
public DataEngineSession(DataEngineImpl engine){
  Object[] params={engine};
  logger.entering(DataEngineSession.class.getName(),"String_Node_Str",params);
  this.context=new HashMap();
  this.engine=engine;
  this.scope=engine.getContext().getJavaScriptScope();
  Context cx=Context.enter();
  if (this.scope == null) {
    this.scope=new ImporterTopLevel(cx);
  }
  new CoreJavaScriptInitializer().initialize(cx,scope);
  Context.exit();
  tempDir=engine.getContext().getTmpdir() + "String_Node_Str" + engine.hashCode();
  File f=new File(tempDir);
  if (!f.exists() || !f.isDirectory()) {
    f.mkdir();
  }
  tempDir+=File.separator;
  this.dataSetCacheManager=new DataSetCacheManager(tempDir,engine);
  logger.exiting(DataEngineSession.class.getName(),"String_Node_Str");
}