nus-yam/ex-repair huggingface dataset:
Program: 75430
Project: 75430
Buggy source:
/** 
 * @param modelAggrType
 * @return
 * @throws AdapterException
 */
public static String adaptModelAggregationType(String modelAggrType) throws AdapterException {
  if (DesignChoiceConstants.MEASURE_FUNCTION_AVERAGE.equals(modelAggrType))   return IBuildInAggregation.TOTAL_AVE_FUNC;
  if (DesignChoiceConstants.MEASURE_FUNCTION_COUNT.equals(modelAggrType))   return IBuildInAggregation.TOTAL_COUNT_FUNC;
  if (DesignChoiceConstants.MEASURE_FUNCTION_COUNTDISTINCT.equals(modelAggrType))   return IBuildInAggregation.TOTAL_COUNTDISTINCT_FUNC;
  if (DesignChoiceConstants.MEASURE_FUNCTION_FIRST.equals(modelAggrType))   return IBuildInAggregation.TOTAL_FIRST_FUNC;
  if (DesignChoiceConstants.MEASURE_FUNCTION_IRR.equals(modelAggrType))   return IBuildInAggregation.TOTAL_IRR_FUNC;
  if (DesignChoiceConstants.MEASURE_FUNCTION_LAST.equals(modelAggrType))   return IBuildInAggregation.TOTAL_LAST_FUNC;
  if (DesignChoiceConstants.MEASURE_FUNCTION_MAX.equals(modelAggrType))   return IBuildInAggregation.TOTAL_MAX_FUNC;
  if (DesignChoiceConstants.MEASURE_FUNCTION_MEDIAN.equals(modelAggrType))   return IBuildInAggregation.TOTAL_MEDIAN_FUNC;
  if (DesignChoiceConstants.MEASURE_FUNCTION_MIN.equals(modelAggrType))   return IBuildInAggregation.TOTAL_MIN_FUNC;
  if (DesignChoiceConstants.MEASURE_FUNCTION_MIRR.equals(modelAggrType))   return IBuildInAggregation.TOTAL_MIRR_FUNC;
  if (DesignChoiceConstants.MEASURE_FUNCTION_MODE.equals(modelAggrType))   return IBuildInAggregation.TOTAL_MODE_FUNC;
  if (DesignChoiceConstants.MEASURE_FUNCTION_MOVINGAVE.equals(modelAggrType))   return IBuildInAggregation.TOTAL_MOVINGAVE_FUNC;
  if (DesignChoiceConstants.MEASURE_FUNCTION_NPV.equals(modelAggrType))   return IBuildInAggregation.TOTAL_NPV_FUNC;
  if (DesignChoiceConstants.MEASURE_FUNCTION_RUNNINGCOUNT.equals(modelAggrType))   return IBuildInAggregation.TOTAL_RUNNINGCOUNT_FUNC;
  if (DesignChoiceConstants.MEASURE_FUNCTION_RUNNINGNPV.equals(modelAggrType))   return IBuildInAggregation.TOTAL_RUNNINGNPV_FUNC;
  if (DesignChoiceConstants.MEASURE_FUNCTION_RUNNINGSUM.equals(modelAggrType))   return IBuildInAggregation.TOTAL_RUNNINGSUM_FUNC;
  if (DesignChoiceConstants.MEASURE_FUNCTION_STDDEV.equals(modelAggrType))   return IBuildInAggregation.TOTAL_STDDEV_FUNC;
  if (DesignChoiceConstants.MEASURE_FUNCTION_SUM.equals(modelAggrType))   return IBuildInAggregation.TOTAL_SUM_FUNC;
  if (DesignChoiceConstants.MEASURE_FUNCTION_VARIANCE.equals(modelAggrType))   return IBuildInAggregation.TOTAL_VARIANCE_FUNC;
  if (DesignChoiceConstants.MEASURE_FUNCTION_WEIGHTEDAVG.equals(modelAggrType))   return IBuildInAggregation.TOTAL_WEIGHTEDAVE_FUNC;
  return null;
}

Fixed version (ground truth):
/** 
 * @param modelAggrType
 * @return
 * @throws AdapterException
 */
public static String adaptModelAggregationType(String modelAggrType) throws AdapterException {
  return (String)aggrAdapterMap.get(modelAggrType);
}
Program: 75431
Project: 75431
Buggy source:
/** 
 * Gets the default units for the design.
 * @return the default units used in the design
 */
public String getUnits(){
  if (!StringUtil.isBlank(units))   return units;
  return (String)getPropertyDefn(UNITS_PROP).getDefault();
}

Fixed version (ground truth):
/** 
 * Gets the default units for the design.
 * @return the default units used in the design
 */
public String getUnits(){
  if (!StringUtil.isBlank(units))   return units;
  String tempUnits=(String)getPropertyDefn(UNITS_PROP).getDefault();
  if (!StringUtil.isBlank(tempUnits))   return tempUnits;
  return getSession().getUnits();
}
Program: 75439
Project: 75439
Buggy source:
/** 
 * @param name
 * @param dimensions
 * @param factTable
 * @param measureColumns
 * @param stopSign
 * @return
 * @throws IOException
 * @throws BirtException
 */
public void createCube(String name,String[][] keyColumnNames,IDimension[] dimensions,IDatasetIterator factTable,String[] measureColumns,StopSign stopSign) throws IOException, BirtException {
  if (stopSign == null) {
    stopSign=new StopSign();
  }
  Cube cube=new Cube(name,documentManager);
  cube.create(keyColumnNames,dimensions,factTable,measureColumns,stopSign);
  cube.close();
  documentManager.flush();
}

Fixed version (ground truth):
/** 
 * @param name
 * @param factTableJointColumnNames
 * @param DimJointColumnNames
 * @param dimensions
 * @param factTable
 * @param measureColumns
 * @param stopSign
 * @throws IOException
 * @throws BirtException
 */
public void createCube(String name,String[][] factTableJointColumnNames,String[][] DimJointColumnNames,IDimension[] dimensions,IDatasetIterator factTable,String[] measureColumns,StopSign stopSign) throws IOException, BirtException {
  if (stopSign == null) {
    stopSign=new StopSign();
  }
  Cube cube=new Cube(name,documentManager);
  cube.create(factTableJointColumnNames,DimJointColumnNames,dimensions,factTable,measureColumns,stopSign);
  cube.close();
  documentManager.flush();
}
Program: 75440
Project: 75440
Buggy source:
/** 
 * @param dimension
 * @param iterator
 * @param measureColumnName
 * @param stopSign
 * @throws IOException
 * @throws BirtException
 */
public void create(String[][] keyColumnNames,IDimension[] dimension,IDatasetIterator iterator,String[] measureColumnName,StopSign stopSign) throws IOException, BirtException {
  IDocumentObject documentObject=documentManager.createDocumentObject(NamingUtil.getCubeDocName(name));
  documentObject.writeString(name);
  documentObject.writeInt(dimension.length);
  for (int i=0; i < dimension.length; i++) {
    documentObject.writeString(dimension[i].getName());
  }
  this.dimension=dimension;
  Dimension[] tDimensions=new Dimension[dimension.length];
  for (int i=0; i < tDimensions.length; i++) {
    tDimensions[i]=(Dimension)dimension[i];
  }
  FactTableAccessor factTableConstructor=new FactTableAccessor(documentManager);
  factTable=factTableConstructor.saveFactTable(name,keyColumnNames,iterator,tDimensions,measureColumnName,stopSign);
  documentObject.close();
  documentManager.flush();
}

Fixed version (ground truth):
/** 
 * @param factTableJointColumnNames
 * @param DimJointColumnNames
 * @param dimension
 * @param iterator
 * @param measureColumnName
 * @param stopSign
 * @throws IOException
 * @throws BirtException
 */
public void create(String[][] factTableJointColumnNames,String[][] DimJointColumnNames,IDimension[] dimension,IDatasetIterator iterator,String[] measureColumnName,StopSign stopSign) throws IOException, BirtException {
  IDocumentObject documentObject=documentManager.createDocumentObject(NamingUtil.getCubeDocName(name));
  documentObject.writeString(name);
  documentObject.writeInt(dimension.length);
  for (int i=0; i < dimension.length; i++) {
    documentObject.writeString(dimension[i].getName());
  }
  this.dimension=dimension;
  Dimension[] tDimensions=new Dimension[dimension.length];
  for (int i=0; i < tDimensions.length; i++) {
    tDimensions[i]=(Dimension)dimension[i];
  }
  FactTableAccessor factTableConstructor=new FactTableAccessor(documentManager);
  factTable=factTableConstructor.saveFactTable(name,factTableJointColumnNames,DimJointColumnNames,iterator,tDimensions,measureColumnName,stopSign);
  documentObject.close();
  documentManager.flush();
}
Program: 75442
Project: 75442
Buggy source:
/** 
 * Updates wizard title as Edit chart.
 */
public void updateTitleAsEdit(){
  if (getTitle().equals(WIZARD_TITLE_NEW)) {
    setTitle(WIZARD_TITLE_EDIT);
    getDialog().setTitle(WIZARD_TITLE_EDIT);
    getDialog().getShell().setText(WIZARD_TITLE_EDIT);
  }
}

Fixed version (ground truth):
/** 
 * Updates wizard title as Edit chart.
 */
public void updateTitleAsEdit(){
  if (getTitle().equals(WIZARD_TITLE_NEW)) {
    setTitle(WIZARD_TITLE_EDIT);
    getDialog().getShell().setText(WIZARD_TITLE_EDIT);
  }
}
Program: 75443
Project: 75443
Buggy source:
protected void setTitle(String wizardTitle){
  dialog.wizardTitle=wizardTitle;
}

Fixed version (ground truth):
protected void setTitle(String wizardTitle){
  dialog.wizardTitle=wizardTitle;
  if (dialog != null) {
    dialog.setTitle(wizardTitle);
  }
}
Program: 75445
Project: 75445
Buggy source:
protected DataSetDesign collectDataSetDesign(DataSetDesign design){
  if (design != null && doc != null)   design.setQueryText(doc.get());
  if (this.shouldUpdateDataSetDesign || !formerQueryTxt.equals(design.getQueryText())) {
    SQLUtility.saveDataSetDesign(design);
    formerQueryTxt=design.getQueryText();
    this.shouldUpdateDataSetDesign=false;
  }
  return design;
}

Fixed version (ground truth):
protected DataSetDesign collectDataSetDesign(DataSetDesign design){
  if (this.getControl() == null || this.getControl().isDisposed())   return design;
  if (design != null && doc != null)   design.setQueryText(doc.get());
  if (this.shouldUpdateDataSetDesign || !formerQueryTxt.equals(design.getQueryText())) {
    SQLUtility.saveDataSetDesign(design);
    formerQueryTxt=design.getQueryText();
    this.shouldUpdateDataSetDesign=false;
  }
  return design;
}
Program: 75446
Project: 75446
Buggy source:
/** 
 * Ececute this command 
 */
public void execute(){
  ModuleHandle handle=SessionHandleAdapter.getInstance().getReportDesignHandle();
  MasterPageHandle page=SessionHandleAdapter.getInstance().getMasterPageHandle();
  String unit=handle.getDefaultUnits();
  double value=MetricUtility.pixelToPixelInch(pDelta);
  if (value < 0.0) {
    value=0.0;
  }
  DimensionValue dim=DimensionUtil.convertTo(value,DesignChoiceConstants.UNITS_IN,unit);
  if (DesignerConstants.TRACING_COMMANDS) {
    System.out.println("String_Node_Str" + page.getDisplayLabel() + "String_Node_Str"+ propertyName+ "String_Node_Str"+ dim.toDisplayString());
  }
  try {
    page.setProperty(propertyName,dim);
    if (DesignerConstants.TRACING_COMMANDS) {
      System.out.println("String_Node_Str");
    }
  }
 catch (  SemanticException e) {
    if (DesignerConstants.TRACING_COMMANDS) {
      System.out.println("String_Node_Str");
    }
    e.printStackTrace();
  }
}

Fixed version (ground truth):
/** 
 * Ececute this command 
 */
public void execute(){
  ModuleHandle handle=SessionHandleAdapter.getInstance().getReportDesignHandle();
  MasterPageHandle page=SessionHandleAdapter.getInstance().getMasterPageHandle();
  String unit=handle.getDefaultUnits();
  if (unit == null) {
    unit=DesignChoiceConstants.UNITS_IN;
  }
  double value=MetricUtility.pixelToPixelInch(pDelta);
  if (value < 0.0) {
    value=0.0;
  }
  DimensionValue dim=DimensionUtil.convertTo(value,DesignChoiceConstants.UNITS_IN,unit);
  if (DesignerConstants.TRACING_COMMANDS) {
    System.out.println("String_Node_Str" + page.getDisplayLabel() + "String_Node_Str"+ propertyName+ "String_Node_Str"+ dim.toDisplayString());
  }
  try {
    page.setProperty(propertyName,dim);
    if (DesignerConstants.TRACING_COMMANDS) {
      System.out.println("String_Node_Str");
    }
  }
 catch (  SemanticException e) {
    if (DesignerConstants.TRACING_COMMANDS) {
      System.out.println("String_Node_Str");
    }
    e.printStackTrace();
  }
}
Program: 75447
Project: 75447
Buggy source:
protected void propertyChange(Map info){
  super.propertyChange(info);
  if (info.get(ReportDesignHandle.LAYOUT_PREFERENCE_PROP) != null) {
    getFigure().invalidateTree();
    getFigure().revalidate();
    if (info.get(ReportDesignHandle.LAYOUT_PREFERENCE_PROP) instanceof ReportDesignHandle) {
      getViewer().setProperty(IReportGraphicConstants.REPORT_LAYOUT_PROPERTY,((ReportDesignHandle)info.get(ReportDesignHandle.LAYOUT_PREFERENCE_PROP)).getLayoutPreference());
    }
  }
  if (info.get(IMasterPageModel.TOP_MARGIN_PROP) != null || info.get(IMasterPageModel.BOTTOM_MARGIN_PROP) != null || info.get(IMasterPageModel.LEFT_MARGIN_PROP) != null || info.get(IMasterPageModel.RIGHT_MARGIN_PROP) != null || info.get(IMasterPageModel.TYPE_PROP) != null || info.get(IMasterPageModel.WIDTH_PROP) != null || info.get(IMasterPageModel.HEIGHT_PROP) != null || info.get(IMasterPageModel.ORIENTATION_PROP) != null) {
    SlotHandle slotHandle=((ModuleHandle)getModel()).getMasterPages();
    Iterator iter=slotHandle.iterator();
    SimpleMasterPageHandle masterPageHandle=(SimpleMasterPageHandle)iter.next();
    Dimension size=getMasterPageSize(masterPageHandle);
    Rectangle bounds=new Rectangle(0,0,size.width - 1,size.height - 1);
    ((ReportDesignLayout)getFigure().getLayoutManager()).setInitSize(bounds);
    figure.setBorder(new ReportDesignMarginBorder(getMasterPageInsets(masterPageHandle)));
    figure.setBounds(bounds.getCopy());
  }
}

Fixed version (ground truth):
protected void propertyChange(Map info){
  super.propertyChange(info);
  if (info.get(ReportDesignHandle.LAYOUT_PREFERENCE_PROP) != null) {
    getFigure().invalidateTree();
    getFigure().revalidate();
    if (info.get(ReportDesignHandle.LAYOUT_PREFERENCE_PROP) instanceof ReportDesignHandle) {
      getViewer().setProperty(IReportGraphicConstants.REPORT_LAYOUT_PROPERTY,((ReportDesignHandle)info.get(ReportDesignHandle.LAYOUT_PREFERENCE_PROP)).getLayoutPreference());
    }
  }
  if (info.get(IMasterPageModel.TOP_MARGIN_PROP) != null || info.get(IMasterPageModel.BOTTOM_MARGIN_PROP) != null || info.get(IMasterPageModel.LEFT_MARGIN_PROP) != null || info.get(IMasterPageModel.RIGHT_MARGIN_PROP) != null || info.get(IMasterPageModel.TYPE_PROP) != null || info.get(IMasterPageModel.WIDTH_PROP) != null || info.get(IMasterPageModel.HEIGHT_PROP) != null || info.get(IMasterPageModel.ORIENTATION_PROP) != null) {
    SlotHandle slotHandle=((ModuleHandle)getModel()).getMasterPages();
    Iterator iter=slotHandle.iterator();
    SimpleMasterPageHandle masterPageHandle=(SimpleMasterPageHandle)iter.next();
    Dimension size=getMasterPageSize(masterPageHandle);
    Rectangle bounds=new Rectangle(0,0,size.width - 1,size.height - 1);
    ((AbstractPageFlowLayout)getFigure().getLayoutManager()).setInitSize(bounds);
    figure.setBorder(new ReportDesignMarginBorder(getMasterPageInsets(masterPageHandle)));
    figure.setBounds(bounds.getCopy());
  }
}
Program: 75448
Project: 75448
Buggy source:
protected void setViewProperty(Rectangle caleBounds,Rectangle ownerBounds){
  getOwner().getViewer().setProperty(DeferredGraphicalViewer.REPORT_SIZE,caleBounds);
  getOwner().getViewer().setProperty(DeferredGraphicalViewer.LAYOUT_SIZE,ownerBounds);
}

Fixed version (ground truth):
protected void setViewProperty(Rectangle caleBounds,Rectangle ownerBounds){
  getOwner().getViewer().setProperty(DeferredGraphicalViewer.LAYOUT_SIZE,ownerBounds);
  getOwner().getViewer().setProperty(DeferredGraphicalViewer.RULER_SIZE,new Rectangle(ownerBounds.x,ownerBounds.y,getInitSize().width,ownerBounds.height));
}
Program: 75450
Project: 75450
Buggy source:
protected void updateLine(){
  if (root == null) {
    return;
  }
  Iterator iter=root.getChildren();
  int height=root.getHeight();
  int lineHeight=((PDFBlockStackingLM)parent).getLineHeight();
  while (iter.hasNext()) {
    AbstractArea child=(AbstractArea)iter.next();
    int childHeight=child.getAllocatedHeight();
    height=Math.max(height,childHeight);
  }
  if (parent.isPageEmpty() && lineHeight > maxAvaHeight) {
    height=Math.max(height,maxAvaHeight);
  }
 else {
    height=Math.max(height,lineHeight);
  }
  root.setContentHeight(height);
}

Fixed version (ground truth):
protected void updateLine(){
  if (root == null) {
    return;
  }
  Iterator iter=root.getChildren();
  int height=root.getHeight();
  int lineHeight=((PDFBlockStackingLM)parent).getLineHeight();
  while (iter.hasNext()) {
    AbstractArea child=(AbstractArea)iter.next();
    int childHeight=child.getAllocatedHeight();
    height=Math.max(height,childHeight);
  }
  if (parent.isPageEmpty()) {
    height=Math.min(maxAvaHeight,Math.max(height,lineHeight));
  }
 else {
    height=Math.max(height,lineHeight);
  }
  root.setContentHeight(height);
}
Program: 75451
Project: 75451
Buggy source:
protected void initialize(){
  super.initialize();
}

Fixed version (ground truth):
protected void initialize(){
  super.initialize();
  maxAvaHeight=getAvaHeight();
}
Program: 75452
Project: 75452
Buggy source:
public static void unzipArchive(File zipArchive,String tempFolderPath){
  try {
    ZipFile zipFile=new ZipFile(zipArchive);
    Enumeration entries=zipFile.entries();
    while (entries.hasMoreElements()) {
      ZipEntry entry=(ZipEntry)entries.nextElement();
      if (entry.isDirectory()) {
        String dirName=generateFullPath(tempFolderPath,entry.getName());
        File dir=new File(dirName);
        dir.mkdirs();
      }
 else {
        InputStream in=zipFile.getInputStream(entry);
        File file=new File(generateFullPath(tempFolderPath,entry.getName()));
        File dir=new File(file.getParent());
        if (dir.exists()) {
          assert(dir.isDirectory());
        }
 else {
          dir.mkdirs();
        }
        BufferedOutputStream out=new BufferedOutputStream(new FileOutputStream(file));
        int len;
        byte[] buf=new byte[1024 * 5];
        while ((len=in.read(buf)) > 0) {
          out.write(buf,0,len);
        }
        in.close();
        out.close();
      }
    }
    zipFile.close();
  }
 catch (  ZipException e) {
    e.printStackTrace();
  }
catch (  IOException e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
public static void unzipArchive(File zipArchive,String tempFolderPath){
  try {
    ZipFile zipFile=new ZipFile(zipArchive);
    Enumeration entries=zipFile.entries();
    while (entries.hasMoreElements()) {
      ZipEntry entry=(ZipEntry)entries.nextElement();
      if (entry.isDirectory()) {
        String dirName=generateFullPath(tempFolderPath,entry.getName());
        File dir=new File(dirName);
        dir.mkdirs();
      }
 else {
        InputStream in=null;
        try {
          in=zipFile.getInputStream(entry);
          File file=new File(generateFullPath(tempFolderPath,entry.getName()));
          File dir=new File(file.getParent());
          if (dir.exists()) {
            assert(dir.isDirectory());
          }
 else {
            dir.mkdirs();
          }
          BufferedOutputStream out=new BufferedOutputStream(new FileOutputStream(file));
          int len;
          byte[] buf=new byte[1024 * 5];
          try {
            while ((len=in.read(buf)) > 0) {
              out.write(buf,0,len);
            }
          }
  finally {
            out.close();
          }
        }
  finally {
          if (in != null) {
            in.close();
          }
        }
      }
    }
    zipFile.close();
  }
 catch (  ZipException e) {
    e.printStackTrace();
  }
catch (  IOException e) {
    e.printStackTrace();
  }
}
Program: 75453
Project: 75453
Buggy source:
/** 
 * Utility funtion to write files/directories to a ZipOutputStream. For directories, all the files and subfolders are written recursively.
 */
private static void zipFiles(ZipOutputStream zipOut,File[] files,String tempFolderPath) throws FileNotFoundException, IOException {
  if (files == null)   return;
  for (int i=0; i < files.length; i++) {
    File file=files[i];
    if (file.isDirectory()) {
      File[] dirFiles=file.listFiles();
      zipFiles(zipOut,dirFiles,tempFolderPath);
    }
 else {
      BufferedInputStream in=new BufferedInputStream(new FileInputStream(file));
      String relativePath=generateRelativePath(tempFolderPath,file.getPath());
      ZipEntry entry=new ZipEntry(relativePath);
      entry.setTime(file.lastModified());
      zipOut.putNextEntry(entry);
      int len;
      byte[] buf=new byte[1024 * 5];
      while ((len=in.read(buf)) > 0) {
        zipOut.write(buf,0,len);
      }
      in.close();
      zipOut.closeEntry();
    }
  }
}

Fixed version (ground truth):
/** 
 * Utility funtion to write files/directories to a ZipOutputStream. For directories, all the files and subfolders are written recursively.
 */
private static void zipFiles(ZipOutputStream zipOut,File[] files,String tempFolderPath) throws FileNotFoundException, IOException {
  if (files == null)   return;
  for (int i=0; i < files.length; i++) {
    File file=files[i];
    if (file.isDirectory()) {
      File[] dirFiles=file.listFiles();
      zipFiles(zipOut,dirFiles,tempFolderPath);
    }
 else {
      BufferedInputStream in=new BufferedInputStream(new FileInputStream(file));
      try {
        String relativePath=generateRelativePath(tempFolderPath,file.getPath());
        ZipEntry entry=new ZipEntry(relativePath);
        try {
          entry.setTime(file.lastModified());
          zipOut.putNextEntry(entry);
          int len;
          byte[] buf=new byte[1024 * 5];
          while ((len=in.read(buf)) > 0) {
            zipOut.write(buf,0,len);
          }
        }
  finally {
          zipOut.closeEntry();
        }
      }
  finally {
        in.close();
      }
    }
  }
}
Program: 75454
Project: 75454
Buggy source:
public RAFolderOutputStream(FolderArchiveWriter archive,File file,boolean append) throws FileNotFoundException, IOException {
  this.archive=archive;
  this.randomFile=new RandomAccessFile(file,"String_Node_Str");
  if (!append) {
    this.randomFile.setLength(0);
  }
  this.bufferMgr=new RAStreamBufferMgr(this.randomFile);
}

Fixed version (ground truth):
public RAFolderOutputStream(FolderArchiveWriter archive,File file,boolean append) throws FileNotFoundException, IOException {
  this.archive=archive;
  this.randomFile=new RandomAccessFile(file,"String_Node_Str");
  try {
    if (!append) {
      this.randomFile.setLength(0);
    }
    this.bufferMgr=new RAStreamBufferMgr(this.randomFile);
  }
 catch (  IOException ex) {
    randomFile.close();
    throw ex;
  }
}
Program: 75455
Project: 75455
Buggy source:
/** 
 * load configuration file
 */
synchronized private void load(){
  if (configFileLoaded)   return;
  InputStream is=null;
  fileConfigVars=new Properties();
  try {
    is=new FileInputStream(configFileName);
    if (is != null)     fileConfigVars.load(is);
  }
 catch (  Exception e) {
    fileConfigVars=null;
  }
  configFileLoaded=true;
}

Fixed version (ground truth):
/** 
 * load configuration file
 */
synchronized private void load(){
  if (configFileLoaded)   return;
  fileConfigVars=new Properties();
  InputStream is=null;
  try {
    is=new FileInputStream(configFileName);
    if (is != null)     fileConfigVars.load(is);
  }
 catch (  Exception e) {
    fileConfigVars=null;
  }
 finally {
    if (is != null) {
      try {
        is.close();
      }
 catch (      Exception ex) {
      }
      is=null;
    }
  }
  configFileLoaded=true;
}
Program: 75458
Project: 75458
Buggy source:
protected IQuery createOdiQuery() throws DataException {
  setCurrentDataSet(dataSetDesign);
  populatePreparedQuery();
  if (doesLoadFromCache() == false)   initializeResultClass(dataEngine,appContext);
  return new JointDataSetQuery(resultClass);
}

Fixed version (ground truth):
protected IQuery createOdiQuery() throws DataException {
  setCurrentDataSet(dataSetDesign);
  populatePreparedQuery();
  initializeResultClass(dataEngine,appContext);
  return new JointDataSetQuery(resultClass);
}
Program: 75459
Project: 75459
Buggy source:
/** 
 * @return
 * @throws DataException 
 */
private IDimensionDefinition getTargetDimension() throws DataException {
  if (isAggregationFilter()) {
    ILevelDefinition targetLevel=cubeFilter.getTargetLevel();
    if (targetLevel == null) {
      throw new DataException("String_Node_Str" + targetLevel.getName() + "String_Node_Str");
    }
    IDimensionDefinition dimDefn=targetLevel.getHierarchy().getDimension();
    if (dimDefn == null) {
      throw new DataException("String_Node_Str" + this.dimName + "String_Node_Str");
    }
    return dimDefn;
  }
 else {
    IEdgeDefinition columnEdge=this.queryDefn.getEdge(ICubeQueryDefinition.COLUMN_EDGE);
    IEdgeDefinition rowEdge=this.queryDefn.getEdge(ICubeQueryDefinition.ROW_EDGE);
    List dims=new ArrayList();
    dims.addAll(columnEdge.getDimensions());
    dims.addAll(rowEdge.getDimensions());
    for (int i=0; i < dims.size(); i++) {
      IDimensionDefinition dimDefn=(IDimensionDefinition)dims.get(i);
      if (dimDefn.getName().equals(this.dimName)) {
        return dimDefn;
      }
    }
    return null;
  }
}

Fixed version (ground truth):
/** 
 * @return
 * @throws DataException 
 */
private IDimensionDefinition getTargetDimension() throws DataException {
  if (isAggregationFilter()) {
    ILevelDefinition targetLevel=cubeFilter.getTargetLevel();
    if (targetLevel == null) {
      throw new DataException("String_Node_Str" + targetLevel.getName() + "String_Node_Str");
    }
    IDimensionDefinition dimDefn=targetLevel.getHierarchy().getDimension();
    if (dimDefn == null) {
      throw new DataException("String_Node_Str" + this.dimName + "String_Node_Str");
    }
    return dimDefn;
  }
 else {
    IEdgeDefinition columnEdge=this.queryDefn.getEdge(ICubeQueryDefinition.COLUMN_EDGE);
    IEdgeDefinition rowEdge=this.queryDefn.getEdge(ICubeQueryDefinition.ROW_EDGE);
    List dims=new ArrayList();
    if (columnEdge != null)     dims.addAll(columnEdge.getDimensions());
    if (rowEdge != null)     dims.addAll(rowEdge.getDimensions());
    for (int i=0; i < dims.size(); i++) {
      IDimensionDefinition dimDefn=(IDimensionDefinition)dims.get(i);
      if (dimDefn.getName().equals(this.dimName)) {
        return dimDefn;
      }
    }
    return null;
  }
}
Program: 75460
Project: 75460
Buggy source:
public String getNodeDisplayName(Object model){
  if (model instanceof ScriptsNode) {
    return SCRIPS_NODE_NAME;
  }
 else   if (model instanceof ScriptElementNode) {
    Object designElementModel=((ScriptElementNode)model).getParent();
    return ProviderFactory.createProvider(designElementModel).getNodeDisplayName(designElementModel);
  }
  if (model instanceof ScriptObjectNode) {
    return ((ScriptObjectNode)model).getText();
  }
  return EMPTY_STR;
}

Fixed version (ground truth):
public String getNodeDisplayName(Object model){
  if (model instanceof ScriptsNode) {
    return SCRIPS_NODE_NAME;
  }
 else   if (model instanceof ScriptElementNode) {
    Object designElementModel=((ScriptElementNode)model).getParent();
    return getFlatHirarchyPathName(designElementModel);
  }
  if (model instanceof ScriptObjectNode) {
    return ((ScriptObjectNode)model).getText();
  }
  return EMPTY_STR;
}
Program: 75461
Project: 75461
Buggy source:
protected void dropSourceElementHandle(DesignElementHandle handle) throws SemanticException {
  if (handle.getContainer() != null) {
    if (DesignerConstants.TRACING_COMMANDS) {
      System.out.println("String_Node_Str" + DEUtil.getDisplayLabel(handle));
    }
    if (handle instanceof CellHandle) {
      dropSourceSlotHandle(((CellHandle)handle).getContent());
    }
 else     if (handle instanceof RowHandle) {
      new DeleteRowCommand(handle).execute();
    }
 else     if (handle instanceof ColumnHandle) {
      new DeleteColumnCommand(handle).execute();
    }
 else {
      handle.dropAndClear();
    }
  }
}

Fixed version (ground truth):
protected void dropSourceElementHandle(DesignElementHandle handle) throws SemanticException {
  if (handle.getContainer() != null) {
    if (DesignerConstants.TRACING_COMMANDS) {
      System.out.println("String_Node_Str" + DEUtil.getDisplayLabel(handle));
    }
    if (handle instanceof ExtendedItemHandle && isExtendedCell((ExtendedItemHandle)handle)) {
      ExtendedItemHandle extendedHandle=(ExtendedItemHandle)handle;
      List list=extendedHandle.getContents(DEUtil.getDefaultContentName(handle));
      for (int i=0; i < list.size(); i++) {
        dropSourceElementHandle((DesignElementHandle)list.get(i));
      }
    }
 else     if (handle instanceof CellHandle) {
      dropSourceSlotHandle(((CellHandle)handle).getContent());
    }
 else     if (handle instanceof RowHandle) {
      new DeleteRowCommand(handle).execute();
    }
 else     if (handle instanceof ColumnHandle) {
      new DeleteColumnCommand(handle).execute();
    }
 else {
      handle.dropAndClear();
    }
  }
}
Program: 75463
Project: 75463
Buggy source:
protected boolean handleButtonUp(int button){
  boolean bool=super.handleButtonUp(button);
  if ((button == 3 || button == 1)) {
    if (getSourceEditPart() instanceof CrosstabFirstCellEditPart) {
      CrosstabFirstCellEditPart first=(CrosstabFirstCellEditPart)getSourceEditPart();
      if (first.contains(getLocation())) {
        manager.createContextMenu(getViewer().getControl());
        Menu menu=manager.getMenu();
        menu.setVisible(true);
        return true;
      }
    }
  }
  return bool;
}

Fixed version (ground truth):
protected boolean handleButtonUp(int button){
  boolean bool=super.handleButtonUp(button);
  if ((button == 1)) {
    if (getSourceEditPart() instanceof CrosstabFirstCellEditPart) {
      CrosstabFirstCellEditPart first=(CrosstabFirstCellEditPart)getSourceEditPart();
      if (first.contains(getLocation())) {
        manager.createContextMenu(getViewer().getControl());
        Menu menu=manager.getMenu();
        menu.setVisible(true);
        return true;
      }
    }
  }
  return bool;
}
Program: 75464
Project: 75464
Buggy source:
protected DragTracker createDragTracker(){
  DragEditPartsTracker track=new DragEditPartsTracker(CrosstabFirstCellEditPart.this){
    protected boolean handleButtonDown(    int button){
      if (getCurrentViewer() instanceof DeferredGraphicalViewer) {
        ((DeferredGraphicalViewer)getCurrentViewer()).initStepDat();
      }
      boolean bool=super.handleButtonDown(button);
      return bool;
    }
    protected boolean handleButtonUp(    int button){
      boolean bool=super.handleButtonUp(button);
      if ((button == 3 || button == 1)) {
        if (getSourceEditPart() instanceof CrosstabFirstCellEditPart) {
          CrosstabFirstCellEditPart first=(CrosstabFirstCellEditPart)getSourceEditPart();
          if (first.contains(getLocation())) {
            manager.createContextMenu(getViewer().getControl());
            Menu menu=manager.getMenu();
            menu.setVisible(true);
            return true;
          }
        }
      }
      return bool;
    }
  }
;
  return track;
}

Fixed version (ground truth):
protected DragTracker createDragTracker(){
  DragEditPartsTracker track=new DragEditPartsTracker(CrosstabFirstCellEditPart.this){
    protected boolean handleButtonDown(    int button){
      if (getCurrentViewer() instanceof DeferredGraphicalViewer) {
        ((DeferredGraphicalViewer)getCurrentViewer()).initStepDat();
      }
      boolean bool=super.handleButtonDown(button);
      return bool;
    }
    protected boolean handleButtonUp(    int button){
      boolean bool=super.handleButtonUp(button);
      if ((button == 1)) {
        if (getSourceEditPart() instanceof CrosstabFirstCellEditPart) {
          CrosstabFirstCellEditPart first=(CrosstabFirstCellEditPart)getSourceEditPart();
          if (first.contains(getLocation())) {
            manager.createContextMenu(getViewer().getControl());
            Menu menu=manager.getMenu();
            menu.setVisible(true);
            return true;
          }
        }
      }
      return bool;
    }
  }
;
  return track;
}
Program: 75466
Project: 75466
Buggy source:
/** 
 * Parse a date/time string.
 * @param source
 * @return
 * @throws ParseException
 */
public static Date parse(String source) throws BirtException, ParseException {
  if (source == null) {
    return null;
  }
  Date resultDate=null;
  source=cleanDate(source);
  Object simpleDateFormatter=DateFormatFactory.getPatternInstance(PatternKey.getPatterKey(source));
  if (simpleDateFormatter != null) {
    try {
      resultDate=((SimpleDateFormat)simpleDateFormatter).parse(source);
      return resultDate;
    }
 catch (    ParseException e1) {
    }
  }
  if (resultDate == null) {
    throw new ParseException("String_Node_Str" + source,0);
  }
  return resultDate;
}

Fixed version (ground truth):
/** 
 * Parse a date/time string.
 * @param source
 * @return
 * @throws ParseException
 */
public static Date parse(String source) throws BirtException, ParseException {
  if (source == null || source.trim().length() == 0) {
    return null;
  }
  Date resultDate=null;
  source=cleanDate(source);
  Object simpleDateFormatter=DateFormatFactory.getPatternInstance(PatternKey.getPatterKey(source));
  if (simpleDateFormatter != null) {
    try {
      resultDate=((SimpleDateFormat)simpleDateFormatter).parse(source);
      return resultDate;
    }
 catch (    ParseException e1) {
    }
  }
  if (resultDate == null) {
    throw new ParseException("String_Node_Str" + source,0);
  }
  return resultDate;
}
Program: 75467
Project: 75467
Buggy source:
/** 
 * Write a Map to an output stream
 * @param dos
 * @param map
 * @throws IOException
 * @throws BirtException
 */
public final static void writeMap(DataOutputStream dos,Map map) throws IOException {
  if (map == null) {
    writeInt(dos,TYPE_NULL);
    return;
  }
 else {
    writeInt(dos,TYPE_MAP);
  }
  int size=map.size();
  writeInt(dos,size);
  if (size == 0)   return;
  Set keySet=map.keySet();
  Iterator it=keySet.iterator();
  while (it.hasNext()) {
    Object key=it.next();
    Object value=map.get(key);
    writeObject(dos,key);
    writeObject(dos,value);
  }
}

Fixed version (ground truth):
/** 
 * Write a Map to an output stream
 * @param dos
 * @param map
 * @throws IOException
 * @throws BirtException
 */
public final static void writeMap(DataOutputStream dos,Map map) throws IOException {
  if (map == null) {
    writeInt(dos,TYPE_NULL);
    return;
  }
 else {
    writeInt(dos,TYPE_MAP);
  }
  int size=map.size();
  writeInt(dos,size);
  if (size == 0)   return;
  Iterator it=map.entrySet().iterator();
  while (it.hasNext()) {
    Map.Entry entry=(Map.Entry)it.next();
    Object key=entry.getKey();
    Object value=entry.getValue();
    writeObject(dos,key);
    writeObject(dos,value);
  }
}
Program: 75471
Project: 75471
Buggy source:
public Iterator getMemberValueIterator(TabularCubeHandle cubeHandle,String targetLevel,ILevelDefinition[] higherLevelDefns,Object[] values) throws AdapterException {
  try {
    if ((higherLevelDefns == null && values != null) || (higherLevelDefns != null && values == null) || cubeHandle == null || targetLevel == null)     return null;
    DimLevel target=OlapExpressionUtil.getTargetDimLevel(targetLevel);
    TabularHierarchyHandle hierHandle=(TabularHierarchyHandle)(cubeHandle.getDimension(target.getDimensionName()).getContent(TabularDimensionHandle.HIERARCHIES_PROP,0));
    this.session.defineDataSource(this.session.getModelAdaptor().adaptDataSource(hierHandle.getDataSet().getDataSource()));
    this.session.defineDataSet(this.session.getModelAdaptor().adaptDataSet(hierHandle.getDataSet()));
    Map levelValueMap=new HashMap();
    if (higherLevelDefns != null) {
      for (int i=0; i < higherLevelDefns.length; i++) {
        if (target.getDimensionName().equals(higherLevelDefns[i].getHierarchy().getDimension().getName())) {
          levelValueMap.put(higherLevelDefns[i].getName(),values[i]);
        }
      }
    }
    DataSetIterator it=new DataSetIterator(this.session,hierHandle);
    return new MemberValueIterator(it,levelValueMap,target.getLevelName());
  }
 catch (  BirtException e) {
    throw new AdapterException(e.getLocalizedMessage(),e);
  }
}

Fixed version (ground truth):
public Iterator getMemberValueIterator(TabularCubeHandle cubeHandle,String targetLevel,ILevelDefinition[] higherLevelDefns,Object[] values) throws AdapterException {
  try {
    if ((higherLevelDefns == null && values != null) || (higherLevelDefns != null && values == null) || cubeHandle == null || targetLevel == null)     return null;
    DimLevel target=OlapExpressionUtil.getTargetDimLevel(targetLevel);
    TabularHierarchyHandle hierHandle=(TabularHierarchyHandle)(cubeHandle.getDimension(target.getDimensionName()).getContent(TabularDimensionHandle.HIERARCHIES_PROP,0));
    defineDataSourceAndDataSet(hierHandle.getDataSet());
    Map levelValueMap=new HashMap();
    if (higherLevelDefns != null) {
      for (int i=0; i < higherLevelDefns.length; i++) {
        if (target.getDimensionName().equals(higherLevelDefns[i].getHierarchy().getDimension().getName())) {
          levelValueMap.put(higherLevelDefns[i].getName(),values[i]);
        }
      }
    }
    DataSetIterator it=new DataSetIterator(this.session,hierHandle);
    return new MemberValueIterator(it,levelValueMap,target.getLevelName());
  }
 catch (  BirtException e) {
    throw new AdapterException(e.getLocalizedMessage(),e);
  }
}
Program: 75473
Project: 75473
Buggy source:
public void startList(IListContent list){
  startCase(list);
}

Fixed version (ground truth):
public void startList(IListContent list){
  int size=list.getChildren().size();
  startCase(list);
  if (size == 0) {
    addData(list.getGenerateBy(),list.getComputedStyle(),parseHyperLink(list),"String_Node_Str");
  }
}
Program: 75475
Project: 75475
Buggy source:
public static Test suite(){
  TestSuite suite=new TestSuite("String_Node_Str");
  suite.addTestSuite(ExtendedElementUIPointTest.class);
  suite.addTestSuite(ExtensionPointManagerTest.class);
  suite.addTestSuite(IReportItemUITest.class);
  return suite;
}

Fixed version (ground truth):
public static Test suite(){
  TestSuite suite=new TestSuite("String_Node_Str");
  suite.addTestSuite(ExtendedElementUIPointTest.class);
  suite.addTestSuite(ExtensionPointManagerTest.class);
  return suite;
}
Program: 75479
Project: 75479
Buggy source:
/** 
 */
private void getAggregationLevelIndex(){
  if (aggregationCalculators == null) {
    return;
  }
  levelIndex=new int[aggregationCalculators.length][];
  for (int i=0; i < aggregationCalculators.length; i++) {
    DimLevel[] levels=aggregationCalculators[i].aggregation.getLevels();
    if (levels == null || levels.length == 0) {
      levelIndex[i]=new int[0];
      continue;
    }
    int[] tmpLevelIndex=new int[levels.length * 2];
    for (int j=0; j < tmpLevelIndex.length / 2; j++) {
      tmpLevelIndex[j * 2]=findDimensionIterator(levels[j].getLevelName());
      tmpLevelIndex[j * 2 + 1]=dimesionResultIterators[tmpLevelIndex[j * 2]].getLevelIndex(levels[j].getLevelName());
    }
    levelIndex[i]=tmpLevelIndex;
  }
}

Fixed version (ground truth):
/** 
 */
private void getAggregationLevelIndex(){
  if (aggregationCalculators == null) {
    return;
  }
  levelIndex=new int[aggregationCalculators.length][];
  for (int i=0; i < aggregationCalculators.length; i++) {
    DimLevel[] levels=aggregationCalculators[i].aggregation.getLevels();
    if (levels == null || levels.length == 0) {
      levelIndex[i]=new int[0];
      continue;
    }
    int[] tmpLevelIndex=new int[levels.length * 2];
    for (int j=0; j < tmpLevelIndex.length / 2; j++) {
      tmpLevelIndex[j * 2]=findDimensionIterator(levels[j]);
      tmpLevelIndex[j * 2 + 1]=dimesionResultIterators[tmpLevelIndex[j * 2]].getLevelIndex(levels[j].getLevelName());
    }
    levelIndex[i]=tmpLevelIndex;
  }
}
Program: 75480
Project: 75480
Buggy source:
/** 
 * @param levelName
 * @return
 */
private int findDimensionIterator(String levelName){
  for (int i=0; i < dimesionResultIterators.length; i++) {
    if (dimesionResultIterators[i].getLevelIndex(levelName) >= 0) {
      return i;
    }
  }
  return -1;
}

Fixed version (ground truth):
/** 
 * @param levelName
 * @return
 */
private int findDimensionIterator(DimLevel level){
  for (int i=0; i < dimesionResultIterators.length; i++) {
    if (dimesionResultIterators[i].getDimesion().getName().equals(level.getDimensionName()) && dimesionResultIterators[i].getLevelIndex(level.getLevelName()) >= 0) {
      return i;
    }
  }
  return -1;
}
Program: 75481
Project: 75481
Buggy source:
/** 
 * Parses a dimension string. The string must match the following: <ul> <li>null</li> <li>[1-9][0-9]*[.[0-9]*[ ]*[in|cm|mm|pt|pc|em|ex|px|%]]</li> </ul> If the error exists, return the result whose measure is 0.
 */
public static DimensionType parserUnit(String value){
  if (value != null) {
    try {
      DimensionValue val=DimensionValue.parse(value);
      return new DimensionType(val.getMeasure(),val.getUnits());
    }
 catch (    PropertyValueException e) {
      log.log(Level.SEVERE,e.getMessage());
    }
  }
  return new DimensionType(0,DimensionType.UNITS_CM);
}

Fixed version (ground truth):
public static DimensionType parserUnit(String value,String defaultUnits){
  if (value != null) {
    try {
      DimensionValue val=DimensionValue.parse(value);
      String units=val.getUnits();
      if (null == units || "String_Node_Str".equals(units)) {
        units=defaultUnits;
      }
      return new DimensionType(val.getMeasure(),units);
    }
 catch (    PropertyValueException e) {
      log.log(Level.SEVERE,e.getMessage());
    }
  }
  return new DimensionType(0,DimensionType.UNITS_CM);
}
Program: 75482
Project: 75482
Buggy source:
/** 
 * Outputs the image
 * @param ele the IMG element instance
 */
protected void outputImg(Element ele,HashMap cssStyles,IContent content){
  String src=ele.getAttribute("String_Node_Str");
  if (src != null) {
    IImageContent image=new ImageContent(content);
    addChild(content,image);
    handleStyle(ele,cssStyles,image);
    if (!FileUtil.isLocalResource(src)) {
      image.setImageSource(IImageContent.IMAGE_URL);
      image.setURI(src);
    }
 else {
      ReportDesignHandle handle=content.getReportContent().getDesign().getReportDesign();
      URL url=handle.findResource(src,IResourceLocator.IMAGE);
      if (url != null) {
        src=url.toString();
      }
      image.setImageSource(IImageContent.IMAGE_FILE);
      image.setURI(src);
    }
    if (null != ele.getAttribute("String_Node_Str") && !"String_Node_Str".equals(ele.getAttribute("String_Node_Str"))) {
      image.setWidth(DimensionType.parserUnit(ele.getAttribute("String_Node_Str")));
    }
    if (ele.getAttribute("String_Node_Str") != null && !"String_Node_Str".equals(ele.getAttribute("String_Node_Str"))) {
      image.setWidth(DimensionType.parserUnit(ele.getAttribute("String_Node_Str")));
    }
    if (ele.getAttribute("String_Node_Str") != null && !"String_Node_Str".equals(ele.getAttribute("String_Node_Str"))) {
      image.setAltText(ele.getAttribute("String_Node_Str"));
    }
  }
}

Fixed version (ground truth):
/** 
 * Outputs the image
 * @param ele the IMG element instance
 */
protected void outputImg(Element ele,HashMap cssStyles,IContent content){
  String src=ele.getAttribute("String_Node_Str");
  if (src != null) {
    IImageContent image=new ImageContent(content);
    addChild(content,image);
    handleStyle(ele,cssStyles,image);
    if (!FileUtil.isLocalResource(src)) {
      image.setImageSource(IImageContent.IMAGE_URL);
      image.setURI(src);
    }
 else {
      ReportDesignHandle handle=content.getReportContent().getDesign().getReportDesign();
      URL url=handle.findResource(src,IResourceLocator.IMAGE);
      if (url != null) {
        src=url.toString();
      }
      image.setImageSource(IImageContent.IMAGE_FILE);
      image.setURI(src);
    }
    if (null != ele.getAttribute("String_Node_Str") && !"String_Node_Str".equals(ele.getAttribute("String_Node_Str"))) {
      image.setWidth(DimensionType.parserUnit(ele.getAttribute("String_Node_Str"),DimensionType.UNITS_PX));
    }
    if (ele.getAttribute("String_Node_Str") != null && !"String_Node_Str".equals(ele.getAttribute("String_Node_Str"))) {
      image.setWidth(DimensionType.parserUnit(ele.getAttribute("String_Node_Str"),DimensionType.UNITS_PX));
    }
    if (ele.getAttribute("String_Node_Str") != null && !"String_Node_Str".equals(ele.getAttribute("String_Node_Str"))) {
      image.setAltText(ele.getAttribute("String_Node_Str"));
    }
  }
}
Program: 75483
Project: 75483
Buggy source:
/** 
 * init save environment
 */
private void initSave(boolean finish) throws DataException {
  if (inited == true)   return;
  inited=true;
  try {
    int totalRowCount=0;
    if (finish == true)     totalRowCount=rowCount;
 else     totalRowCount=rowCount == 0 ? 1 : rowCount;
    IOUtil.writeInt(this.rowExprsDos,totalRowCount);
    Map map=new HashMap();
    Iterator it=exprNameSet.iterator();
    while (it.hasNext()) {
      Object value=it.next();
      map.put(value,value);
    }
    int rowBytes=this.saveExprValue(map);
    IOUtil.writeInt(this.rowExprsDos,rowBytes);
  }
 catch (  IOException e) {
    throw new DataException(ResourceConstants.RD_SAVE_ERROR,e);
  }
}

Fixed version (ground truth):
/** 
 * init save environment
 */
private void initSave(boolean finish) throws DataException {
  if (inited == true)   return;
  inited=true;
  try {
    IOUtil.writeInt(this.rowExprsDos,rowCount);
    Map map=new HashMap();
    Iterator it=exprNameSet.iterator();
    while (it.hasNext()) {
      Object value=it.next();
      map.put(value,value);
    }
    int rowBytes=this.saveExprValue(map);
    IOUtil.writeInt(this.rowExprsDos,rowBytes);
  }
 catch (  IOException e) {
    throw new DataException(ResourceConstants.RD_SAVE_ERROR,e);
  }
}
Program: 75484
Project: 75484
Buggy source:
public Map getRowValue() throws DataException {
  try {
    if (currReadIndex < currRowIndex + 1) {
      this.skipTo(currRowIndex);
      this.exprValueMap=this.getValueMap();
    }
    currReadIndex=currRowIndex + 1;
  }
 catch (  IOException e) {
    throw new DataException(ResourceConstants.RD_LOAD_ERROR,e,"String_Node_Str");
  }
  return exprValueMap;
}

Fixed version (ground truth):
public Map getRowValue() throws DataException {
  try {
    if (this.rowCount == 0) {
      if (this.exprValueMap == null)       this.exprValueMap=this.getValueMap();
    }
 else     if (currReadIndex < currRowIndex + 1) {
      this.skipTo(currRowIndex);
      this.exprValueMap=this.getValueMap();
    }
    currReadIndex=currRowIndex + 1;
  }
 catch (  IOException e) {
    throw new DataException(ResourceConstants.RD_LOAD_ERROR,e,"String_Node_Str");
  }
  return exprValueMap;
}
Program: 75485
Project: 75485
Buggy source:
public Map getRowValue() throws DataException {
  if (lastRowIndex == currRowIndex)   return this.exprValueMap;
  lastRowIndex=currRowIndex;
  try {
    this.skipTo(nextDestIndex);
    this.exprValueMap=this.getValueMap();
  }
 catch (  IOException e) {
    throw new DataException(ResourceConstants.RD_LOAD_ERROR,e,"String_Node_Str");
  }
  return exprValueMap;
}

Fixed version (ground truth):
public Map getRowValue() throws DataException {
  try {
    if (this.rowCount == 0) {
      if (this.exprValueMap == null)       this.exprValueMap=this.getValueMap();
    }
 else {
      if (lastRowIndex == currRowIndex)       return this.exprValueMap;
      lastRowIndex=currRowIndex;
      this.skipTo(nextDestIndex);
      this.exprValueMap=this.getValueMap();
    }
  }
 catch (  IOException e) {
    throw new DataException(ResourceConstants.RD_LOAD_ERROR,e,"String_Node_Str");
  }
  return exprValueMap;
}
Program: 75486
Project: 75486
Buggy source:
/** 
 * Gets the children of the given model. The default children element include following: Body,Styles,MasterPage
 * @param model the given report design
 * @return the result list that contains the model
 */
public Object[] getChildren(Object model){
  LibraryHandle handle=((LibraryHandle)model);
  ArrayList list=new ArrayList();
  list.add(handle.getCubes());
  return list.toArray();
}

Fixed version (ground truth):
/** 
 * Gets the children of the given model. The default children element include following: Body,Styles,MasterPage
 * @param model the given report design
 * @return the result list that contains the model
 */
public Object[] getChildren(Object model){
  LibraryHandle handle=((LibraryHandle)model);
  ArrayList list=new ArrayList();
  if (handle.getNamespace() == null) {
    list.add(handle.getCubes());
  }
  return list.toArray();
}
Program: 75487
Project: 75487
Buggy source:
/** 
 * Gets the children of the given model. The default children element include following: Body,Styles,MasterPage
 * @param model the given report design
 * @return the result list that contains the model
 */
public Object[] getChildren(Object model){
  LibraryHandle handle=((LibraryHandle)model);
  ArrayList list=new ArrayList();
  list.add(handle.getDataSources());
  list.add(handle.getDataSets());
  return list.toArray();
}

Fixed version (ground truth):
/** 
 * Gets the children of the given model. The default children element include following: Body,Styles,MasterPage
 * @param model the given report design
 * @return the result list that contains the model
 */
public Object[] getChildren(Object model){
  LibraryHandle handle=((LibraryHandle)model);
  ArrayList list=new ArrayList();
  if (handle.getNamespace() == null) {
    list.add(handle.getDataSources());
    list.add(handle.getDataSets());
  }
  return list.toArray();
}