nus-yam/ex-repair huggingface dataset:
Program: 75613
Project: 75613
Buggy source:
private IResultIterator executeSubQuery(DataSetID dataSet,long rowId,ISubqueryDefinition query) throws BirtException {
  IResultIterator rsetIter=null;
  String rset=dataSet.getDataSetName();
  if (rset != null) {
    rsetIter=executeQuery(rset,(QueryDefinition)query.getParentQuery());
  }
 else {
    rsetIter=executeSubQuery(dataSet.getParentID(),dataSet.getRowID(),(ISubqueryDefinition)query.getParentQuery());
  }
  while (rsetIter.next()) {
    if (rsetIter.getRowId() == rowId) {
      String queryName=query.getName();
      Scriptable scope=executionContext.getSharedScope();
      return rsetIter.getSecondaryIterator(queryName,scope);
    }
  }
  return null;
}

Fixed version (ground truth):
private IResultIterator executeSubQuery(DataSetID dataSet,long rowId,ISubqueryDefinition query) throws BirtException {
  IResultIterator rsetIter=null;
  String rset=dataSet.getDataSetName();
  if (rset != null) {
    rsetIter=executeQuery(rset,(QueryDefinition)query.getParentQuery());
  }
 else {
    rsetIter=executeSubQuery(dataSet.getParentID(),dataSet.getRowID(),(ISubqueryDefinition)query.getParentQuery());
  }
  rsetIter.moveTo((int)rowId);
  String queryName=query.getName();
  Scriptable scope=executionContext.getSharedScope();
  return rsetIter.getSecondaryIterator(queryName,scope);
}
Program: 75614
Project: 75614
Buggy source:
/** 
 * method to get data set design by name 
 * @param name
 * @return data set
 */
IDataSet getDataSet(String name);

Fixed version (ground truth):
/** 
 * method to get data set design by name
 * @param name
 * @return data set
 */
IDataSet getDataSet(String name);
Program: 75615
Project: 75615
Buggy source:
public static IDesignElement getElement(org.eclipse.birt.report.model.api.simpleapi.IDesignElement element){
  if (element == null)   return null;
  if (element instanceof IReportDesign)   return new ReportDesign((IReportDesign)element);
  if (element instanceof IDataItem)   return new DataItem((IDataItem)element);
  if (element instanceof IGrid)   return new Grid((IGrid)element);
  if (element instanceof IImage)   return new Image((IImage)element);
  if (element instanceof ILabel)   return new Label((ILabel)element);
  if (element instanceof IList)   return new List((IList)element);
  if (element instanceof ITable)   return new Table((ITable)element);
  if (element instanceof IDynamicText)   return new DynamicText((IDynamicText)element);
  if (element instanceof ITextItem)   return new TextItem((ITextItem)element);
  if (element instanceof IReportItem)   return new ReportItem((IReportItem)element);
  if (element instanceof IReportElement)   return new ReportElement((IReportElement)element);
  return new DesignElement(element);
}

Fixed version (ground truth):
public static IDesignElement getElement(org.eclipse.birt.report.model.api.simpleapi.IDesignElement element){
  if (element == null)   return null;
  if (element instanceof IReportDesign)   return new ReportDesign((IReportDesign)element);
  if (element instanceof IDataItem)   return new DataItem((IDataItem)element);
  if (element instanceof IGrid)   return new Grid((IGrid)element);
  if (element instanceof IImage)   return new Image((IImage)element);
  if (element instanceof ILabel)   return new Label((ILabel)element);
  if (element instanceof IList)   return new List((IList)element);
  if (element instanceof ITable)   return new Table((ITable)element);
  if (element instanceof IDynamicText)   return new DynamicText((IDynamicText)element);
  if (element instanceof ITextItem)   return new TextItem((ITextItem)element);
  if (element instanceof IMasterPage)   return new MasterPage((IMasterPage)element);
  if (element instanceof IReportItem)   return new ReportItem((IReportItem)element);
  if (element instanceof IReportElement)   return new ReportElement((IReportElement)element);
  return new DesignElement(element);
}
Program: 75616
Project: 75616
Buggy source:
/** 
 * Creates actions and registers them to the ActionRegistry.
 */
protected void createActions(){
  addStackAction(new UndoAction(this));
  addStackAction(new RedoAction(this));
  addEditPartAction(new DeleteAction((IWorkbenchPart)this){
  }
);
  SaveAction saveAction=new SaveAction(this);
  saveAction.setLazyEnablementCalculation(true);
  addEditorAction(saveAction);
  addAction(new CopyTemplateAction(this));
}

Fixed version (ground truth):
/** 
 * Creates actions and registers them to the ActionRegistry.
 */
protected void createActions(){
  addStackAction(new UndoAction(this));
  addStackAction(new RedoAction(this));
  addEditPartAction(new DeleteAction((IWorkbenchPart)this){
    public Command createDeleteCommand(    List objects){
      if (objects.isEmpty())       return null;
      if (!(objects.get(0) instanceof EditPart))       return null;
      GroupRequest deleteReq=new GroupRequest(RequestConstants.REQ_DELETE);
      deleteReq.setEditParts(objects);
      List temp=TableUtil.filletCellModel(objects);
      List list=new ArrayList();
      for (int i=0; i < temp.size(); i++) {
        EditPart object=(EditPart)temp.get(i);
        list.add(object.getModel());
      }
      return new DeleteCommand(list.toArray());
    }
  }
);
  SaveAction saveAction=new SaveAction(this);
  saveAction.setLazyEnablementCalculation(true);
  addEditorAction(saveAction);
  addAction(new CopyTemplateAction(this));
}
Program: 75617
Project: 75617
Buggy source:
public PDFPageDevice(OutputStream output,String title,IReportContext context,IReportContent report){
  this.context=context;
  this.report=report;
  doc=new Document();
  PDFPage.reset();
  try {
    writer=PdfWriter.getInstance(doc,new BufferedOutputStream(output));
    if (null != title)     doc.addTitle(title);
  }
 catch (  DocumentException de) {
    logger.log(Level.SEVERE,de.getMessage(),de);
  }
}

Fixed version (ground truth):
public PDFPageDevice(OutputStream output,String title,IReportContext context,IReportContent report){
  this.context=context;
  this.report=report;
  doc=new Document();
  PDFPage.reset();
  try {
    writer=PdfWriter.getInstance(doc,new BufferedOutputStream(output));
    String creator="String_Node_Str" + BundleVersionUtil.getBundleVersion("String_Node_Str") + "String_Node_Str"+ BundleVersionUtil.getBundleVersion("String_Node_Str");
    doc.addCreator(creator);
    if (null != title)     doc.addTitle(title);
  }
 catch (  DocumentException de) {
    logger.log(Level.SEVERE,de.getMessage(),de);
  }
}
Program: 75618
Project: 75618
Buggy source:
protected void buildStyle(IStyle style,StringBuffer styleBuffer){
  if (null == style) {
    return;
  }
  AttributeBuilder.buildStyle(styleBuffer,style,parentEmitter);
  AttributeBuilder.checkHyperlinkTextDecoration(style,styleBuffer);
  String value=style.getDisplay();
  if (null != value) {
    styleBuffer.append("String_Node_Str");
    styleBuffer.append(value);
    styleBuffer.append("String_Node_Str");
  }
  value=style.getVerticalAlign();
  if (null != value) {
    styleBuffer.append("String_Node_Str");
    styleBuffer.append(value);
    styleBuffer.append("String_Node_Str");
  }
  value=style.getTextAlign();
  if (null != value) {
    styleBuffer.append("String_Node_Str");
    styleBuffer.append(value);
    styleBuffer.append("String_Node_Str");
  }
}

Fixed version (ground truth):
protected void buildStyle(IStyle style,StringBuffer styleBuffer){
  if (null == style) {
    return;
  }
  AttributeBuilder.buildStyle(styleBuffer,style,parentEmitter);
  String value=style.getVerticalAlign();
  if (null != value) {
    styleBuffer.append("String_Node_Str");
    styleBuffer.append(value);
    styleBuffer.append("String_Node_Str");
  }
  value=style.getTextAlign();
  if (null != value) {
    styleBuffer.append("String_Node_Str");
    styleBuffer.append(value);
    styleBuffer.append("String_Node_Str");
  }
}
Program: 75619
Project: 75619
Buggy source:
/** 
 * Base class implementation of post service process.
 * @param request
 * @param response
 * @throws ServletException
 * @throws IOException
 */
protected String doPostService(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException {
  String className=getClass().getName().substring(getClass().getName().lastIndexOf('.') + 1);
  return JSPRootPath + "String_Node_Str" + className+ "String_Node_Str";
}

Fixed version (ground truth):
/** 
 * Base class implementation of post service process.
 * @param request
 * @param response
 * @throws ServletException
 * @throws IOException
 */
protected String doPostService(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException {
  response.setHeader("String_Node_Str","String_Node_Str");
  response.setHeader("String_Node_Str","String_Node_Str");
  response.setDateHeader("String_Node_Str",0);
  String className=getClass().getName().substring(getClass().getName().lastIndexOf('.') + 1);
  return JSPRootPath + "String_Node_Str" + className+ "String_Node_Str";
}
Program: 75620
Project: 75620
Buggy source:
/** 
 * Read a String from an input stream
 * @param inputStream
 * @return an String
 * @throws IOException
 */
public final static String readString(DataInputStream dis) throws IOException {
  if (readInt(dis) == TYPE_NULL)   return null;
  return readUTF(dis);
}

Fixed version (ground truth):
/** 
 * Read a String from an input stream
 * @param inputStream
 * @return an String
 * @throws IOException
 */
public final static String readString(DataInputStream dis) throws IOException {
  int type=readInt(dis);
  if (type == TYPE_NULL) {
    return null;
  }
 else   if (type == TYPE_STRING) {
    return dis.readUTF();
  }
 else {
    return readUTF(dis);
  }
}
Program: 75621
Project: 75621
Buggy source:
/** 
 * from object class to its type index value
 * @param obValue
 * @return
 */
private static int getTypeIndex(Object obValue){
  if (obValue == null)   return TYPE_NULL;
  Integer indexOb=(Integer)type2IndexMap.get(obValue.getClass());
  if (indexOb == null) {
    if (obValue instanceof Map) {
      return TYPE_MAP;
    }
    if (obValue instanceof List) {
      return TYPE_LIST;
    }
    if (obValue instanceof Scriptable) {
      return TYPE_JSObject;
    }
    if (obValue instanceof Serializable) {
      return TYPE_SERIALIZABLE;
    }
    return -1;
  }
  return indexOb.intValue();
}

Fixed version (ground truth):
/** 
 * from object class to its type index value
 * @param obValue
 * @return
 */
private static int getTypeIndex(Object obValue){
  if (obValue == null)   return TYPE_NULL;
  if (obValue instanceof String) {
    if (isLongString((String)obValue)) {
      return TYPE_LONG_STRING;
    }
 else {
      return TYPE_STRING;
    }
  }
  Integer indexOb=(Integer)type2IndexMap.get(obValue.getClass());
  if (indexOb == null) {
    if (obValue instanceof Map) {
      return TYPE_MAP;
    }
    if (obValue instanceof List) {
      return TYPE_LIST;
    }
    if (obValue instanceof Scriptable) {
      return TYPE_JSObject;
    }
    if (obValue instanceof Serializable) {
      return TYPE_SERIALIZABLE;
    }
    return -1;
  }
  return indexOb.intValue();
}
Program: 75622
Project: 75622
Buggy source:
/** 
 * Write a String value to an output stream
 * @param outputStream
 * @param str
 * @throws IOException
 */
public final static void writeString(DataOutputStream dos,String str) throws IOException {
  if (str == null) {
    writeInt(dos,TYPE_NULL);
    return;
  }
 else {
    writeInt(dos,TYPE_STRING);
  }
  writeUTF(dos,str);
}

Fixed version (ground truth):
/** 
 * Write a String value to an output stream
 * @param outputStream
 * @param str
 * @throws IOException
 */
public final static void writeString(DataOutputStream dos,String str) throws IOException {
  if (str == null) {
    writeInt(dos,TYPE_NULL);
    return;
  }
 else {
    if (isLongString(str)) {
      writeInt(dos,TYPE_LONG_STRING);
      writeUTF(dos,str);
    }
 else {
      writeInt(dos,TYPE_STRING);
      dos.writeUTF(str);
    }
  }
}
Program: 75623
Project: 75623
Buggy source:
/** 
 * Returns the target element for the notification event.
 * @return the event target
 */
private ContentElementInfo getEventTarget(){
  IContainerDefn tmpContainerDefn=focus.getContainerDefn();
  if (tmpContainerDefn instanceof SlotDefn)   return null;
  DesignElement tmpElement=focus.getElement();
  PropertyDefn tmpPropDefn=(PropertyDefn)tmpContainerDefn;
  ContentElementInfo retTarget=new ContentElementInfo(true);
  while (tmpElement != null && tmpPropDefn != null) {
    retTarget.pushStep(tmpPropDefn,-1);
    if (tmpPropDefn.getTypeCode() == IPropertyType.CONTENT_ELEMENT_TYPE) {
      retTarget.setTopElement(tmpElement);
      return retTarget;
    }
    ContainerContext context=tmpElement.getContainerInfo();
    if (context == null)     break;
    tmpElement=tmpElement.getContainer();
    tmpPropDefn=tmpElement.getPropertyDefn(context.getPropertyName());
  }
  return null;
}

Fixed version (ground truth):
/** 
 * Returns the target element for the notification event.
 * @return the event target
 */
private ContentElementInfo getEventTarget(){
  IContainerDefn tmpContainerDefn=focus.getContainerDefn();
  if (tmpContainerDefn instanceof SlotDefn)   return null;
  DesignElement tmpElement=focus.getElement();
  PropertyDefn tmpPropDefn=(PropertyDefn)tmpContainerDefn;
  ContentElementInfo retTarget=new ContentElementInfo(true);
  while (tmpElement != null && tmpPropDefn != null) {
    retTarget.pushStep(tmpPropDefn,-1);
    if (tmpPropDefn.getTypeCode() == IPropertyType.CONTENT_ELEMENT_TYPE && !(tmpElement instanceof ContentElement)) {
      retTarget.setTopElement(tmpElement);
      return retTarget;
    }
    ContainerContext context=tmpElement.getContainerInfo();
    if (context == null)     break;
    tmpElement=tmpElement.getContainer();
    tmpPropDefn=tmpElement.getPropertyDefn(context.getPropertyName());
  }
  return null;
}
Program: 75624
Project: 75624
Buggy source:
public static void CreateSubTotalLabel(LevelViewHandle levelView,CrosstabCellHandle cellHandle) throws SemanticException {
  LabelHandle dataHandle=DesignElementFactory.getInstance().newLabel(null);
  dataHandle.setText("String_Node_Str" + levelView.getCubeLevelName() + "String_Node_Str"+ DISPALY_NAME);
  cellHandle.addContent(dataHandle);
}

Fixed version (ground truth):
public static void CreateSubTotalLabel(LevelViewHandle levelView,CrosstabCellHandle cellHandle) throws SemanticException {
  LabelHandle dataHandle=DesignElementFactory.getInstance().newLabel(null);
  dataHandle.setText("String_Node_Str" + levelView.getCubeLevel().getName() + "String_Node_Str"+ DISPALY_NAME);
  cellHandle.addContent(dataHandle);
}
Program: 75625
Project: 75625
Buggy source:
/** 
 * @param owner
 * @param measureHandle
 * @return
 */
public static ComputedColumn createComputedColumn(ReportItemHandle owner,MeasureHandle measureHandle){
  ComputedColumn bindingColumn=StructureFactory.newComputedColumn(owner,measureHandle.getName());
  bindingColumn.setDataType(DesignChoiceConstants.COLUMN_DATA_TYPE_ANY);
  bindingColumn.setExpression(DEUtil.getExpression(measureHandle));
  return bindingColumn;
}

Fixed version (ground truth):
/** 
 * @param owner
 * @param measureHandle
 * @return
 */
public static ComputedColumn createComputedColumn(ReportItemHandle owner,MeasureHandle measureHandle){
  ComputedColumn bindingColumn=StructureFactory.newComputedColumn(owner,measureHandle.getName());
  bindingColumn.setDataType(measureHandle.getDataType());
  bindingColumn.setExpression(DEUtil.getExpression(measureHandle));
  return bindingColumn;
}
Program: 75626
Project: 75626
Buggy source:
public int allocateBlock(int blockNo) throws IOException {
  int newBlock=findFreeBlock();
  OatFile.seek(blockNo * 4);
  OatFile.writeInt(newBlock);
  return newBlock;
}

Fixed version (ground truth):
public int allocateBlock(int blockNo) throws IOException {
  int newBlock=findFreeBlock();
  oatAccessFile.seek(blockNo * 4);
  oatAccessFile.writeInt(newBlock);
  return newBlock;
}
Program: 75627
Project: 75627
Buggy source:
/** 
 * @param structure
 * @throws IOException
 */
private void writeObjectStructure(ObjectStructure structure) throws IOException {
  objectFile.seek(objectFile.length());
  structure.fileOffset=(int)objectFile.getFilePointer();
  objectFile.writeLong(structure.length);
  objectFile.writeInt(structure.firstBlock);
  objectFile.writeUTF(structure.name);
}

Fixed version (ground truth):
/** 
 * @param structure
 * @throws IOException
 */
private void writeObjectStructure(ObjectStructure structure) throws IOException {
  objectAccessFile.seek(objectAccessFile.length());
  structure.fileOffset=(int)objectAccessFile.getFilePointer();
  objectAccessFile.writeLong(structure.length);
  objectAccessFile.writeInt(structure.firstBlock);
  objectAccessFile.writeUTF(structure.name);
}
Program: 75628
Project: 75628
Buggy source:
public IDocumentObject createDocumentObject(String documentObjectName) throws IOException {
  ObjectStructure objectStructure=new ObjectStructure();
  objectStructure.name=documentObjectName;
  objectStructure.firstBlock=findFreeBlock();
  objectStructure.length=0;
  writeObjectStructure(objectStructure);
  this.documentObjectMap.put(objectStructure.name,objectStructure);
  return new DocumentObject(new BufferedRandomDataAccessObject(new BlockRandomAccessObject(dataFile,documentObjectName,objectStructure.firstBlock,objectStructure.length,this),1024));
}

Fixed version (ground truth):
public IDocumentObject createDocumentObject(String documentObjectName) throws IOException {
  ObjectStructure objectStructure=new ObjectStructure();
  objectStructure.name=documentObjectName;
  objectStructure.firstBlock=findFreeBlock();
  objectStructure.length=0;
  writeObjectStructure(objectStructure);
  this.documentObjectMap.put(objectStructure.name,objectStructure);
  return new DocumentObject(new BufferedRandomDataAccessObject(new BlockRandomAccessObject(dataAccessFile,documentObjectName,objectStructure.firstBlock,objectStructure.length,this),1024));
}
Program: 75629
Project: 75629
Buggy source:
/** 
 * @return
 * @throws IOException
 */
private int findFreeBlock() throws IOException {
  int oldLength=(int)OatFile.length();
  OatFile.setLength(oldLength + 4);
  return (int)(oldLength / 4);
}

Fixed version (ground truth):
/** 
 * @return
 * @throws IOException
 */
private int findFreeBlock() throws IOException {
  int oldLength=(int)oatAccessFile.length();
  oatAccessFile.setLength(oldLength + 4);
  return (int)(oldLength / 4);
}
Program: 75630
Project: 75630
Buggy source:
public IDocumentObject openDocumentObject(String documentObjectName) throws IOException {
  ObjectStructure objectStructure=(ObjectStructure)this.documentObjectMap.get(documentObjectName);
  if (objectStructure == null) {
    return null;
  }
  return new DocumentObject(new BufferedRandomDataAccessObject(new BlockRandomAccessObject(dataFile,documentObjectName,objectStructure.firstBlock,objectStructure.length,this),1024));
}

Fixed version (ground truth):
public IDocumentObject openDocumentObject(String documentObjectName) throws IOException {
  ObjectStructure objectStructure=(ObjectStructure)this.documentObjectMap.get(documentObjectName);
  if (objectStructure == null) {
    return null;
  }
  return new DocumentObject(new BufferedRandomDataAccessObject(new BlockRandomAccessObject(dataAccessFile,documentObjectName,objectStructure.firstBlock,objectStructure.length,this),1024));
}
Program: 75631
Project: 75631
Buggy source:
/** 
 * @param dirName
 * @param managerName
 * @throws IOException
 * @throws DataException
 */
private void load(String dirName,String managerName) throws IOException, DataException {
  documentObjectMap=new HashMap();
  File file=new File(dirName + File.separatorChar + managerName+ "String_Node_Str");
  objectFile=new BufferedRandomAccessFile(file,"String_Node_Str",1024);
  if (!file.exists()) {
    throw new DataException(ResourceConstants.OLAPFILE_NOT_FOUND,file.getAbsolutePath());
  }
  file=new File(dirName + File.separatorChar + managerName+ "String_Node_Str");
  if (!file.exists()) {
    throw new DataException(ResourceConstants.OLAPFILE_NOT_FOUND,file.getAbsolutePath());
  }
  OatFile=new BufferedRandomAccessFile(file,"String_Node_Str",1024);
  file=new File(dirName + File.separatorChar + managerName+ "String_Node_Str");
  if (!file.exists()) {
    throw new DataException(ResourceConstants.OLAPFILE_NOT_FOUND,file.getAbsolutePath());
  }
  dataFile=new BufferedRandomAccessFile(file,"String_Node_Str",1024);
  objectFile.seek(0);
  while (true) {
    try {
      ObjectStructure structure=readObjectStructure();
      if (structure.firstBlock >= 0)       documentObjectMap.put(structure.name,structure);
    }
 catch (    EOFException e) {
      return;
    }
  }
}

Fixed version (ground truth):
/** 
 * @param dirName
 * @param managerName
 * @throws IOException
 * @throws DataException
 */
private void load(String dirName,String managerName) throws IOException, DataException {
  documentObjectMap=new HashMap();
  File file=new File(dirName + File.separatorChar + managerName+ "String_Node_Str");
  objectAccessFile=new BufferedRandomAccessFile(file,"String_Node_Str",1024);
  if (!file.exists()) {
    throw new DataException(ResourceConstants.OLAPFILE_NOT_FOUND,file.getAbsolutePath());
  }
  file=new File(dirName + File.separatorChar + managerName+ "String_Node_Str");
  if (!file.exists()) {
    throw new DataException(ResourceConstants.OLAPFILE_NOT_FOUND,file.getAbsolutePath());
  }
  oatAccessFile=new BufferedRandomAccessFile(file,"String_Node_Str",1024);
  file=new File(dirName + File.separatorChar + managerName+ "String_Node_Str");
  if (!file.exists()) {
    throw new DataException(ResourceConstants.OLAPFILE_NOT_FOUND,file.getAbsolutePath());
  }
  dataAccessFile=new BufferedRandomAccessFile(file,"String_Node_Str",1024);
  objectAccessFile.seek(0);
  while (true) {
    try {
      ObjectStructure structure=readObjectStructure();
      if (structure.firstBlock >= 0)       documentObjectMap.put(structure.name,structure);
    }
 catch (    EOFException e) {
      return;
    }
  }
}
Program: 75632
Project: 75632
Buggy source:
public void flush() throws IOException {
  objectFile.flush();
  OatFile.flush();
  dataFile.flush();
}

Fixed version (ground truth):
public void flush() throws IOException {
  objectAccessFile.flush();
  oatAccessFile.flush();
  dataAccessFile.flush();
}
Program: 75633
Project: 75633
Buggy source:
public void setObjectLength(String documentObjectName,long length) throws IOException {
  ObjectStructure objectStructure=(ObjectStructure)documentObjectMap.get(documentObjectName);
  if (objectStructure == null) {
    return;
  }
  objectStructure.length=length;
  objectFile.seek(objectStructure.fileOffset);
  objectFile.writeLong(length);
}

Fixed version (ground truth):
public void setObjectLength(String documentObjectName,long length) throws IOException {
  ObjectStructure objectStructure=(ObjectStructure)documentObjectMap.get(documentObjectName);
  if (objectStructure == null) {
    return;
  }
  objectStructure.length=length;
  objectAccessFile.seek(objectStructure.fileOffset);
  objectAccessFile.writeLong(length);
}
Program: 75634
Project: 75634
Buggy source:
/** 
 * @param dirName
 * @param managerName
 * @throws IOException
 * @throws DataException
 */
private void create(String dirName,String managerName) throws IOException, DataException {
  documentObjectMap=new HashMap();
  File file=new File(dirName + File.separatorChar + managerName+ "String_Node_Str");
  if (!file.exists()) {
    if (!new File(dirName).exists()) {
      new File(dirName).mkdirs();
    }
    try {
      if (!file.createNewFile()) {
        throw new DataException(ResourceConstants.OLAPFILE_CREATE_FAIL,file.getAbsolutePath());
      }
    }
 catch (    IOException e) {
      throw new DataException(ResourceConstants.OLAPFILE_CREATE_FAIL,e,file.getAbsolutePath());
    }
  }
  objectFile=new BufferedRandomAccessFile(file,"String_Node_Str",1024);
  objectFile.setLength(0);
  file=new File(dirName + File.separatorChar + managerName+ "String_Node_Str");
  if (!file.exists()) {
    if (!file.createNewFile()) {
      throw new DataException(ResourceConstants.OLAPFILE_CREATE_FAIL,file.getAbsolutePath());
    }
  }
  OatFile=new BufferedRandomAccessFile(file,"String_Node_Str",1024);
  OatFile.setLength(0);
  file=new File(dirName + File.separatorChar + managerName+ "String_Node_Str");
  if (!file.exists()) {
    if (!file.createNewFile()) {
      throw new DataException(ResourceConstants.OLAPFILE_CREATE_FAIL,file.getAbsolutePath());
    }
  }
  dataFile=new BufferedRandomAccessFile(file,"String_Node_Str",1024);
  dataFile.setLength(0);
}

Fixed version (ground truth):
/** 
 * @param dirName
 * @param managerName
 * @throws IOException
 * @throws DataException
 */
private void create(String dirName,String managerName) throws IOException, DataException {
  documentObjectMap=new HashMap();
  objectFile=new File(dirName + File.separatorChar + managerName+ "String_Node_Str");
  if (!objectFile.exists()) {
    if (!new File(dirName).exists()) {
      new File(dirName).mkdirs();
    }
    try {
      if (!objectFile.createNewFile()) {
        throw new DataException(ResourceConstants.OLAPFILE_CREATE_FAIL,objectFile.getAbsolutePath());
      }
    }
 catch (    IOException e) {
      throw new DataException(ResourceConstants.OLAPFILE_CREATE_FAIL,e,objectFile.getAbsolutePath());
    }
  }
  objectAccessFile=new BufferedRandomAccessFile(objectFile,"String_Node_Str",1024);
  objectAccessFile.setLength(0);
  oatFile=new File(dirName + File.separatorChar + managerName+ "String_Node_Str");
  if (!oatFile.exists()) {
    if (!oatFile.createNewFile()) {
      throw new DataException(ResourceConstants.OLAPFILE_CREATE_FAIL,oatFile.getAbsolutePath());
    }
  }
  oatAccessFile=new BufferedRandomAccessFile(oatFile,"String_Node_Str",1024);
  oatAccessFile.setLength(0);
  dataFile=new File(dirName + File.separatorChar + managerName+ "String_Node_Str");
  if (!dataFile.exists()) {
    if (!dataFile.createNewFile()) {
      throw new DataException(ResourceConstants.OLAPFILE_CREATE_FAIL,dataFile.getAbsolutePath());
    }
  }
  dataAccessFile=new BufferedRandomAccessFile(dataFile,"String_Node_Str",1024);
  dataAccessFile.setLength(0);
}
Program: 75635
Project: 75635
Buggy source:
public int getNextBlock(int blockNo) throws IOException {
  OatFile.seek(blockNo * 4);
  return OatFile.readInt();
}

Fixed version (ground truth):
public int getNextBlock(int blockNo) throws IOException {
  oatAccessFile.seek(blockNo * 4);
  return oatAccessFile.readInt();
}
Program: 75636
Project: 75636
Buggy source:
public void close() throws IOException {
  objectFile.close();
  OatFile.close();
  dataFile.close();
}

Fixed version (ground truth):
public void close() throws IOException {
  objectAccessFile.close();
  oatAccessFile.close();
  dataAccessFile.close();
  clearTmpFile();
}
Program: 75637
Project: 75637
Buggy source:
/** 
 * @return
 * @throws IOException
 */
private ObjectStructure readObjectStructure() throws IOException {
  ObjectStructure structure=new ObjectStructure();
  structure.fileOffset=(int)objectFile.getFilePointer();
  structure.length=objectFile.readLong();
  structure.firstBlock=objectFile.readInt();
  structure.name=objectFile.readUTF();
  return structure;
}

Fixed version (ground truth):
/** 
 * @return
 * @throws IOException
 */
private ObjectStructure readObjectStructure() throws IOException {
  ObjectStructure structure=new ObjectStructure();
  structure.fileOffset=(int)objectAccessFile.getFilePointer();
  structure.length=objectAccessFile.readLong();
  structure.firstBlock=objectAccessFile.readInt();
  structure.name=objectAccessFile.readUTF();
  return structure;
}
Program: 75639
Project: 75639
Buggy source:
/** 
 * This method will be invoked while a containerArea ends.
 * @param container the ContainerArea specified from layout
 */
protected void endContainer(IContainerArea container){
  if (container instanceof PageArea) {
    pageGraphic.dispose();
  }
  if (!containerStack.isEmpty()) {
    containerStack.pop();
  }
}

Fixed version (ground truth):
/** 
 * This method will be invoked while a containerArea ends.
 * @param container the ContainerArea specified from layout
 */
protected void endContainer(IContainerArea container){
  if (container instanceof PageArea) {
    pageGraphic.dispose();
  }
 else {
    pageGraphic.clipRestore();
  }
  if (!containerStack.isEmpty()) {
    containerStack.pop();
  }
}
Program: 75640
Project: 75640
Buggy source:
/** 
 * If the container is a PageArea, this method creates a pdf page. If the container is the other containerAreas, such as TableArea, or just the border of textArea/imageArea this method draws the border and background of the given container.
 * @param container the ContainerArea specified from layout
 */
protected void startContainer(IContainerArea container){
  if (container instanceof PageArea) {
    scale=container.getScale();
    hTextSpace=(int)(H_TEXT_SPACE * scale);
    vTextSpace=(int)(V_TEXT_SPACE * scale);
    newPage(container);
    containerStack.push(new ContainerPosition(0,0));
  }
 else {
    drawContainer(container);
    ContainerPosition pos;
    if (!containerStack.isEmpty()) {
      pos=(ContainerPosition)containerStack.peek();
      ContainerPosition current=new ContainerPosition(pos.x + getX(container),pos.y + getY(container));
      containerStack.push(current);
    }
 else {
      containerStack.push(new ContainerPosition(getX(container),getY(container)));
    }
  }
}

Fixed version (ground truth):
/** 
 * If the container is a PageArea, this method creates a pdf page. If the container is the other containerAreas, such as TableArea, or just the border of textArea/imageArea this method draws the border and background of the given container.
 * @param container the ContainerArea specified from layout
 */
protected void startContainer(IContainerArea container){
  if (container instanceof PageArea) {
    scale=container.getScale();
    hTextSpace=(int)(H_TEXT_SPACE * scale);
    vTextSpace=(int)(V_TEXT_SPACE * scale);
    newPage(container);
    containerStack.push(new ContainerPosition(0,0));
  }
 else {
    pageGraphic.clipSave();
    clip(container);
    drawContainer(container);
    ContainerPosition pos;
    if (!containerStack.isEmpty()) {
      pos=(ContainerPosition)containerStack.peek();
      ContainerPosition current=new ContainerPosition(pos.x + getX(container),pos.y + getY(container));
      containerStack.push(current);
    }
 else {
      containerStack.push(new ContainerPosition(getX(container),getY(container)));
    }
  }
}
Program: 75644
Project: 75644
Buggy source:
/** 
 * Get classes with specified comparator
 * @param comp the coparator
 * @return List of classes
 */
public static List getClasses(Comparator comp){
  List classes=getMetaDataDictionary().getClasses();
  Collections.sort(classes,comp);
  return classes;
}

Fixed version (ground truth):
/** 
 * Get classes with specified comparator
 * @param comp the coparator
 * @return List of classes
 */
public static List getClasses(Comparator comp){
  List classes=getMetaDataDictionary().getClasses();
  Collections.sort(classes,comp);
  classes.remove(TOTAL_CLASS);
  return classes;
}
Program: 75645
Project: 75645
Buggy source:
/** 
 * Returns the extension name according to format
 * @param format
 * @return
 */
public static String getExtensionName(String format){
  if (format == null)   return null;
  String key="String_Node_Str" + format;
  return DataUtil.trimString(getInitProp(key));
}

Fixed version (ground truth):
/** 
 * Returns the extension name according to format
 * @param format
 * @return
 */
public static String getExtensionName(String format){
  if (format == null)   return null;
  String key="String_Node_Str" + format.replaceAll("String_Node_Str","String_Node_Str");
  return DataUtil.trimString(getInitProp(key));
}
Program: 75646
Project: 75646
Buggy source:
/** 
 * Close the container tag.
 */
public void closeContainerTag(){
  writer.closeTag(HTMLTags.TAG_DIV);
}

Fixed version (ground truth):
/** 
 * Close the container tag.
 */
public void closeContainerTag(){
  writer.closeTag(HTMLTags.TAG_DIV);
  int display=((Integer)cellDisplayStack.pop()).intValue();
  if (((display & HTMLEmitterUtil.DISPLAY_INLINE) > 0) || ((display & HTMLEmitterUtil.DISPLAY_INLINE_BLOCK) > 0)) {
    closeInlineBoxTag();
  }
}
Program: 75647
Project: 75647
Buggy source:
/** 
 * Open the container tag.
 */
public void openContainerTag(IContainerContent container){
  writer.openTag(HTMLTags.TAG_DIV);
}

Fixed version (ground truth):
/** 
 * Open the container tag.
 */
public void openContainerTag(IContainerContent container){
  DimensionType x=container.getX();
  DimensionType y=container.getY();
  DimensionType width=container.getWidth();
  DimensionType height=container.getHeight();
  int display=getElementType(x,y,width,height,container.getStyle());
  cellDisplayStack.push(new Integer(display));
  if (((display & HTMLEmitterUtil.DISPLAY_INLINE) > 0) || ((display & HTMLEmitterUtil.DISPLAY_INLINE_BLOCK) > 0)) {
    openInlineBoxTag();
  }
  writer.openTag(HTMLTags.TAG_DIV);
}
Program: 75648
Project: 75648
Buggy source:
/** 
 * Compare the DesignerValue and OdaDataSetParameter, if one param does not exist in DesignerValue, it must be user-defined one. Keep it in user-defined-param-list.
 * @param parameters
 * @throws SemanticException
 */
void updateUserDefinedParameter(DataSetParameters parameters){
  List tmpParams=new ArrayList();
  if (parameters == null) {
    for (int i=0; i < setDefinedParams.size(); i++) {
      tmpParams.add(((OdaDataSetParameterHandle)setDefinedParams.get(i)).getStructure());
    }
  }
 else {
    List posList=getPositions(parameters);
    for (int i=0; i < setDefinedParams.size(); i++) {
      OdaDataSetParameterHandle paramHandle=(OdaDataSetParameterHandle)setDefinedParams.get(i);
      Integer position=paramHandle.getPosition();
      if (position == null)       continue;
      if (!posList.contains(position)) {
        tmpParams.add(paramHandle.getStructure());
      }
    }
  }
  userDefinedParams=new ArrayList();
  for (int i=0; i < tmpParams.size(); i++) {
    userDefinedParams.add(((OdaDataSetParameter)tmpParams.get(i)).copy());
  }
  tmpParams.clear();
}

Fixed version (ground truth):
/** 
 * Compare the DesignerValue and OdaDataSetParameter, if one param does not exist in DesignerValue, it must be user-defined one. Keep it in user-defined-param-list.
 * @param parameters
 * @throws SemanticException
 */
void updateUserDefinedParameter(DataSetParameters parameters){
  userDefinedParams=new ArrayList();
  if (parameters == null) {
    for (int i=0; i < setDefinedParams.size(); i++) {
      userDefinedParams.add(((OdaDataSetParameterHandle)setDefinedParams.get(i)).getStructure());
    }
  }
 else {
    List posList=getPositions(parameters);
    for (int i=0; i < setDefinedParams.size(); i++) {
      OdaDataSetParameterHandle paramHandle=(OdaDataSetParameterHandle)setDefinedParams.get(i);
      Integer position=paramHandle.getPosition();
      if (position == null)       continue;
      if (!posList.contains(position)) {
        userDefinedParams.add(paramHandle.getStructure());
      }
    }
  }
}
Program: 75649
Project: 75649
Buggy source:
/** 
 * Update parameters in DataSetHandle with DataSetDesign's.
 * @param setDesign data set design contains driver-defined parameters
 * @param setHandle data set handle
 * @param cachedParameters the cached data set parameters in the designer values
 * @param userDefinedList a list contains user-defined parameters. Each item is <code>OdaDataSetParameter</code>.
 * @throws SemanticException
 */
private void updateROMDataSetParams(DataSetParameterAdapter setParamAdapter,DataSetParameters cachedParameters) throws SemanticException {
  List newParams=setParamAdapter.newROMSetParams(cachedParameters);
  OdaDataSetHandle setHandle=setParamAdapter.getSetHandle();
  PropertyHandle propHandle=setHandle.getPropertyHandle(OdaDataSetHandle.PARAMETERS_PROP);
  propHandle.clearValue();
  IdentifierUtility.updateParams2UniqueName(newParams);
  for (int i=0; i < newParams.size(); i++) {
    propHandle.addItem((OdaDataSetParameter)newParams.get(i));
  }
}

Fixed version (ground truth):
/** 
 * Update parameters in DataSetHandle with DataSetDesign's.
 * @param setDesign data set design contains driver-defined parameters
 * @param setHandle data set handle
 * @param cachedParameters the cached data set parameters in the designer values
 * @param userDefinedList a list contains user-defined parameters. Each item is <code>OdaDataSetParameter</code>.
 * @throws SemanticException
 */
private void updateROMDataSetParams(DataSetParameterAdapter setParamAdapter,DataSetParameters cachedParameters) throws SemanticException {
  List newParams=setParamAdapter.newROMSetParams(cachedParameters);
  OdaDataSetHandle setHandle=setParamAdapter.getSetHandle();
  IdentifierUtility.updateParams2UniqueName(newParams);
  setParamAdapter.updateRomDataSetParamsWithNewValues(setHandle,newParams);
}
Program: 75650
Project: 75650
Buggy source:
public List getReferencedLevels(String targetLevel,String bindingExpr,ICubeQueryDefinition queryDefn) throws AdapterException {
  try {
    List result=new ArrayList();
    DimLevel target=OlapExpressionUtil.getTargetDimLevel(targetLevel);
    String bindingName=OlapExpressionCompiler.getReferencedScriptObject(bindingExpr,"String_Node_Str");
    if (bindingName == null)     return result;
    IBinding binding=null;
    List bindings=queryDefn.getBindings();
    for (int i=0; i < bindings.size(); i++) {
      IBinding bd=(IBinding)bindings.get(i);
      if (bd.getBindingName().equals(bindingName)) {
        binding=bd;
        break;
      }
    }
    if (bindingName == null) {
      return result;
    }
    List aggrOns=binding.getAggregatOns();
    IEdgeDefinition axisQualifierEdge=queryDefn.getEdge(this.getAxisQualifierEdgeType(target,queryDefn));
    for (int i=0; i < aggrOns.size(); i++) {
      DimLevel dimLevel=OlapExpressionUtil.getTargetDimLevel(aggrOns.get(i).toString());
      ILevelDefinition lvl=getAxisQualifierLevel(dimLevel,axisQualifierEdge);
      if (lvl != null)       result.add(lvl);
    }
    return result;
  }
 catch (  DataException e) {
    throw new AdapterException(e.getLocalizedMessage(),e);
  }
}

Fixed version (ground truth):
public List getReferencedLevels(String targetLevel,String bindingExpr,ICubeQueryDefinition queryDefn) throws AdapterException {
  try {
    List result=new ArrayList();
    DimLevel target=OlapExpressionUtil.getTargetDimLevel(targetLevel);
    String bindingName=OlapExpressionCompiler.getReferencedScriptObject(bindingExpr,"String_Node_Str");
    if (bindingName == null)     return result;
    IBinding binding=null;
    List bindings=queryDefn.getBindings();
    for (int i=0; i < bindings.size(); i++) {
      IBinding bd=(IBinding)bindings.get(i);
      if (bd.getBindingName().equals(bindingName)) {
        binding=bd;
        break;
      }
    }
    if (binding == null) {
      return result;
    }
    List aggrOns=binding.getAggregatOns();
    IEdgeDefinition axisQualifierEdge=queryDefn.getEdge(this.getAxisQualifierEdgeType(target,queryDefn));
    for (int i=0; i < aggrOns.size(); i++) {
      DimLevel dimLevel=OlapExpressionUtil.getTargetDimLevel(aggrOns.get(i).toString());
      ILevelDefinition lvl=getAxisQualifierLevel(dimLevel,axisQualifierEdge);
      if (lvl != null)       result.add(lvl);
    }
    return result;
  }
 catch (  DataException e) {
    throw new AdapterException(e.getLocalizedMessage(),e);
  }
}
Program: 75651
Project: 75651
Buggy source:
private ILevelDefinition getAxisQualifierLevel(DimLevel dimLevel,IEdgeDefinition edge){
  if (edge == null)   return null;
  List dims=edge.getDimensions();
  for (int i=0; i < dims.size(); i++) {
    IDimensionDefinition dim=(IDimensionDefinition)dims.get(i);
    if (!dim.getName().equals(dimLevel.getDimensionName()))     return null;
    IHierarchyDefinition hier=(IHierarchyDefinition)dim.getHierarchy().get(0);
    List levels=hier.getLevels();
    for (int j=0; j < levels.size(); j++) {
      ILevelDefinition level=(ILevelDefinition)levels.get(j);
      if (level.getName().equals(dimLevel.getLevelName()))       return level;
    }
  }
  return null;
}

Fixed version (ground truth):
/** 
 * @param dimLevel
 * @param edge
 * @return
 */
private ILevelDefinition getAxisQualifierLevel(DimLevel dimLevel,IEdgeDefinition edge){
  if (edge == null)   return null;
  List dims=edge.getDimensions();
  for (int i=0; i < dims.size(); i++) {
    IDimensionDefinition dim=(IDimensionDefinition)dims.get(i);
    if (!dim.getName().equals(dimLevel.getDimensionName()))     return null;
    IHierarchyDefinition hier=(IHierarchyDefinition)dim.getHierarchy().get(0);
    List levels=hier.getLevels();
    for (int j=0; j < levels.size(); j++) {
      ILevelDefinition level=(ILevelDefinition)levels.get(j);
      if (level.getName().equals(dimLevel.getLevelName()))       return level;
    }
  }
  return null;
}
Program: 75653
Project: 75653
Buggy source:
private void createLeafLevel(List levels,ILevelDefn[] levelInHier,String[] leafLevelKeyColumn){
  if (levelInHier.length > levels.size()) {
    levelInHier[levelInHier.length - 1]=CubeElementFactory.createLevelDefinition("String_Node_Str",leafLevelKeyColumn,new String[0]);
  }
}

Fixed version (ground truth):
/** 
 * @param levels
 * @param levelInHier
 * @param leafLevelKeyColumn
 */
private void createLeafLevel(List levels,ILevelDefn[] levelInHier,String[] leafLevelKeyColumn){
  if (levelInHier.length > levels.size()) {
    levelInHier[levelInHier.length - 1]=CubeElementFactory.createLevelDefinition("String_Node_Str",leafLevelKeyColumn,new String[0]);
  }
}
Program: 75654
Project: 75654
Buggy source:
public ICubeQueryUtil getCubeQueryUtil(){
  return new CubeQueryUtil();
}

Fixed version (ground truth):
public ICubeQueryUtil getCubeQueryUtil(){
  return new CubeQueryUtil(this);
}
Program: 75656
Project: 75656
Buggy source:
protected void handleUpdate(){
  Data data=new Data();
  data.setConfirmation("String_Node_Str");
  UpdateData updateData=new UpdateData();
  updateData.setTarget("String_Node_Str");
  updateData.setData(data);
  Update update=new Update();
  update.setUpdateData(updateData);
  response.setUpdate(new Update[]{update});
}

Fixed version (ground truth):
/** 
 * Handle response
 */
protected void handleUpdate(){
  Data data=new Data();
  data.setConfirmation("String_Node_Str");
  UpdateData updateData=new UpdateData();
  updateData.setTarget("String_Node_Str");
  updateData.setData(data);
  Update update=new Update();
  update.setUpdateData(updateData);
  response.setUpdate(new Update[]{update});
}
Program: 75657
Project: 75657
Buggy source:
protected void __execute() throws Exception {
}

Fixed version (ground truth):
/** 
 * execute action
 */
protected void __execute() throws Exception {
}
Program: 75659
Project: 75659
Buggy source:
public Object[] getElements(Object inputElement){
  if (inputElement instanceof DesignElementHandle) {
    DesignElementHandle eleHandle=(DesignElementHandle)inputElement;
    if (eleHandle.getDefn() != null) {
      return eleHandle.getDefn().getMethods().toArray();
    }
  }
  return new Object[]{};
}

Fixed version (ground truth):
public Object[] getElements(Object inputElement){
  if (inputElement instanceof DesignElementHandle) {
    DesignElementHandle eleHandle=(DesignElementHandle)inputElement;
    if (eleHandle.getDefn() != null) {
      return eleHandle.getMethods().toArray();
    }
  }
  return new Object[]{};
}
Program: 75660
Project: 75660
Buggy source:
/** 
 * @return
 */
public synchronized static String nextID(){
  return QURE_ID_PREFIX + (qursStart++);
}

Fixed version (ground truth):
/** 
 * @return
 */
public static String nextID(){
  int id=((Integer)qursStart.get()).intValue();
  qursStart.set(new Integer(id + 1));
  return QURE_ID_PREFIX + (id);
}
Program: 75662
Project: 75662
Buggy source:
public void run(){
  ReportRequest r=new ReportRequest();
  r.setType(ReportRequest.LOAD_MASTERPAGE);
  r.setSelectionObject(request.getSelectionModelList());
  SessionHandleAdapter.getInstance().getMediator().notifyRequest(r);
}

Fixed version (ground truth):
public void run(){
  setFocus();
}
Program: 75663
Project: 75663
Buggy source:
public void renderReport(IProgressMonitor monitor){
  if (!assignParamValues)   return;
  assignParamValues=false;
  monitor.subTask("String_Node_Str");
  if (monitor.isCanceled()) {
    return;
  }
  monitor.worked(1);
  monitor.subTask("String_Node_Str");
  if (monitor.isCanceled()) {
    return;
  }
  File reportFile=new File(reportDesignFile);
  String outputFolder=getOutputFolder(reportFile);
  String outputFormat="String_Node_Str";
  if (isDrillThrough) {
    outputFormat=(String)drillRenderOption.getOutputFormat();
  }
  this.outputLocation=outputFolder + File.separator + reportFile.getName()+ "String_Node_Str"+ outputFormat;
  try {
    if (currentPageNum > 0) {
      try {
        this.reportDocumentFile=createReportDocument(reportDesignFile,outputFolder,this.paramValues);
        this.totalPageNum=createReportOutput(this.reportDocumentFile,this.outputLocation,currentPageNum);
      }
 catch (      EngineException e) {
        e.printStackTrace();
      }
    }
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
  if (monitor.isCanceled()) {
    return;
  }
  monitor.worked(3);
}

Fixed version (ground truth):
public void renderReport(IProgressMonitor monitor){
  if (hasParas && !assignParamValues)   return;
  assignParamValues=false;
  monitor.subTask("String_Node_Str");
  if (monitor.isCanceled()) {
    return;
  }
  monitor.worked(1);
  monitor.subTask("String_Node_Str");
  if (monitor.isCanceled()) {
    return;
  }
  File reportFile=new File(reportDesignFile);
  String outputFolder=getOutputFolder(reportFile);
  String outputFormat="String_Node_Str";
  if (isDrillThrough) {
    outputFormat=(String)drillRenderOption.getOutputFormat();
  }
  this.outputLocation=outputFolder + File.separator + reportFile.getName()+ "String_Node_Str"+ outputFormat;
  try {
    if (currentPageNum > 0) {
      try {
        this.reportDocumentFile=createReportDocument(reportDesignFile,outputFolder,this.paramValues);
        this.totalPageNum=createReportOutput(this.reportDocumentFile,this.outputLocation,currentPageNum);
      }
 catch (      EngineException e) {
        e.printStackTrace();
      }
    }
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
  if (monitor.isCanceled()) {
    return;
  }
  monitor.worked(3);
}
Program: 75664
Project: 75664
Buggy source:
/** 
 * get Dte temporary dir.
 * @return
 */
public String getTmpdir(){
  return tmpDir;
}

Fixed version (ground truth):
/** 
 * get Dte temporary dir.
 * @return
 */
public String getTmpdir(){
  if (!tmpDir.endsWith(File.separator)) {
    return tmpDir + File.separator;
  }
  return tmpDir;
}
Program: 75665
Project: 75665
Buggy source:
/** 
 * @return
 */
private File getMetaCacheFile(){
  File file=new File(context.getTmpdir() + File.separator + CACHED_FILE_PREFIX+ queryResultID+ "String_Node_Str");
  return file;
}

Fixed version (ground truth):
/** 
 * @return
 */
private File getMetaCacheFile(){
  File file=new File(context.getTmpdir() + CACHED_FILE_PREFIX + queryResultID+ "String_Node_Str");
  return file;
}
Program: 75666
Project: 75666
Buggy source:
/** 
 * @return
 */
private File getRowCacheFile(){
  File file=new File(context.getTmpdir() + File.separator + CACHED_FILE_PREFIX+ queryResultID+ "String_Node_Str");
  return file;
}

Fixed version (ground truth):
/** 
 * @return
 */
private File getRowCacheFile(){
  File file=new File(context.getTmpdir() + CACHED_FILE_PREFIX + queryResultID+ "String_Node_Str");
  return file;
}
Program: 75667
Project: 75667
Buggy source:
/** 
 * @return
 */
private File getRowCacheFile(){
  File file=new File(context.getTmpdir() + File.separator + CACHED_FILE_PREFIX+ resultService.getQueryResults().getID()+ "String_Node_Str");
  return file;
}

Fixed version (ground truth):
/** 
 * @return
 */
private File getRowCacheFile(){
  File file=new File(context.getTmpdir() + CACHED_FILE_PREFIX + resultService.getQueryResults().getID()+ "String_Node_Str");
  return file;
}
Program: 75668
Project: 75668
Buggy source:
/** 
 * @return
 */
private File getMetaCacheFile(){
  File file=new File(context.getTmpdir() + File.separator + CACHED_FILE_PREFIX+ resultService.getQueryResults().getID()+ "String_Node_Str");
  return file;
}

Fixed version (ground truth):
/** 
 * @return
 */
private File getMetaCacheFile(){
  File file=new File(context.getTmpdir() + CACHED_FILE_PREFIX + resultService.getQueryResults().getID()+ "String_Node_Str");
  return file;
}