nus-yam/ex-repair huggingface dataset:
Program: 74462
Project: 74462
Buggy source:
protected void parseRenderOptions() throws Exception {
  assert(mode.equalsIgnoreCase("String_Node_Str"));
  if (results.hasOption('f')) {
    format=results.getOptionValue('f');
  }
  if (results.hasOption('t')) {
    htmlType=results.getOptionValue('t');
  }
  if (results.hasOption('o')) {
    targetFile=results.getOptionValue('o');
  }
  if (results.hasOption('l')) {
    locale=results.getOptionValue('l');
  }
  if (results.hasOption('e')) {
    encoding=results.getOptionValue('e');
  }
  if (results.hasOption('p')) {
    String paramPageNumber=results.getOptionValue('p');
    try {
      pageNumber=Long.parseLong(paramPageNumber);
    }
 catch (    NumberFormatException nfe) {
      logger.log(Level.SEVERE,"String_Node_Str" + paramPageNumber + "String_Node_Str");
    }
  }
  parseParameterOptions();
}

Fixed version (ground truth):
protected void parseRenderOptions() throws Exception {
  assert(mode.equalsIgnoreCase("String_Node_Str"));
  if (params.get("String_Node_Str") != null) {
    format=(String)params.get("String_Node_Str");
  }
  if (results.hasOption('f')) {
    format=results.getOptionValue('f');
  }
  if (params.get("String_Node_Str") != null) {
    htmlType=(String)params.get("String_Node_Str");
  }
  if (results.hasOption('t')) {
    htmlType=results.getOptionValue('t');
  }
  if (params.get("String_Node_Str") != null) {
    targetFile=(String)params.get("String_Node_Str");
  }
  if (results.hasOption('o')) {
    targetFile=results.getOptionValue('o');
  }
  if (params.get("String_Node_Str") != null) {
    locale=(String)params.get("String_Node_Str");
  }
  if (results.hasOption('l')) {
    locale=results.getOptionValue('l');
  }
  if (params.get("String_Node_Str") != null) {
    encoding=(String)params.get("String_Node_Str");
  }
  if (results.hasOption('e')) {
    encoding=results.getOptionValue('e');
  }
  String paramPageNumber=(String)params.get("String_Node_Str");
  if (results.hasOption('p')) {
    paramPageNumber=results.getOptionValue('p');
  }
  if (paramPageNumber != null) {
    try {
      pageNumber=Long.parseLong(paramPageNumber);
    }
 catch (    NumberFormatException nfe) {
      logger.log(Level.SEVERE,"String_Node_Str" + paramPageNumber + "String_Node_Str");
    }
  }
}
Program: 74463
Project: 74463
Buggy source:
/** 
 * Check if the arguments are valid. If yes, continue to execuate the report. If no, simply return.
 */
public int execute(){
  if (args.length == 0) {
    printUsage();
    return 0;
  }
  try {
    if (engine == null) {
      EngineConfig config=new EngineConfig();
      Platform.startup(config);
      IReportEngineFactory factory=(IReportEngineFactory)Platform.createFactoryObject(IReportEngineFactory.EXTENSION_REPORT_ENGINE_FACTORY);
      engine=factory.createReportEngine(config);
      engine.changeLogLevel(Level.WARNING);
    }
    parseOptions();
    if ("String_Node_Str".equalsIgnoreCase(mode)) {
      return runReport();
    }
 else     if ("String_Node_Str".equalsIgnoreCase(mode)) {
      return renderReport();
    }
 else {
      return runAndRenderReport();
    }
  }
 catch (  Exception ex) {
    logger.log(Level.SEVERE,"String_Node_Str",ex);
    return -1;
  }
 finally {
    Platform.shutdown();
  }
}

Fixed version (ground truth):
/** 
 * Check if the arguments are valid. If yes, continue to execuate the report. If no, simply return.
 */
public int execute(){
  if (args.length == 0) {
    printUsage();
    return 0;
  }
  try {
    parseOptions();
    if (engine == null) {
      EngineConfig config=createEngineConfig();
      Platform.startup(config);
      IReportEngineFactory factory=(IReportEngineFactory)Platform.createFactoryObject(IReportEngineFactory.EXTENSION_REPORT_ENGINE_FACTORY);
      engine=factory.createReportEngine(config);
      engine.changeLogLevel(Level.WARNING);
    }
    if ("String_Node_Str".equalsIgnoreCase(mode)) {
      return runReport();
    }
 else     if ("String_Node_Str".equalsIgnoreCase(mode)) {
      return renderReport();
    }
 else {
      return runAndRenderReport();
    }
  }
 catch (  Exception ex) {
    logger.log(Level.SEVERE,"String_Node_Str",ex);
    return -1;
  }
 finally {
    Platform.shutdown();
  }
}
Program: 74464
Project: 74464
Buggy source:
/** 
 * print out the command line usage.
 */
protected void printUsage(){
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
}

Fixed version (ground truth):
/** 
 * print out the command line usage.
 */
protected void printUsage(){
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str");
}
Program: 74465
Project: 74465
Buggy source:
protected void parseRunOptions() throws Exception {
  if (results.hasOption('o')) {
    targetFile=results.getOptionValue('o');
  }
  parseParameterOptions();
}

Fixed version (ground truth):
protected void parseRunOptions() throws Exception {
  assert(mode.equalsIgnoreCase("String_Node_Str"));
  if (params.get("String_Node_Str") != null) {
    targetFile=(String)params.get("String_Node_Str");
  }
  if (results.hasOption('o')) {
    targetFile=results.getOptionValue('o');
  }
}
Program: 74470
Project: 74470
Buggy source:
/** 
 * @param cube
 */
public CubeQueryExecutorHelper(ICube cube){
  logger.entering(CubeQueryExecutorHelper.class.getName(),"String_Node_Str",cube);
  this.cube=(Cube)cube;
  this.levelFilters=new ArrayList();
  this.aggrFilterHelpers=new ArrayList();
  this.dimJSFilterMap=new HashMap();
  this.dimRowForFilterMap=new HashMap();
  this.rowSort=new ArrayList();
  this.columnSort=new ArrayList();
  dimLevelsMap=new HashMap();
  IDimension[] dimension=this.cube.getDimesions();
  for (int i=0; i < dimension.length; i++) {
    ILevel[] levels=dimension[i].getHierarchy().getLevels();
    dimLevelsMap.put(dimension[i].getName(),levels);
  }
  logger.exiting(CubeQueryExecutorHelper.class.getName(),"String_Node_Str");
}

Fixed version (ground truth):
/** 
 * @param cube
 */
public CubeQueryExecutorHelper(ICube cube){
  logger.entering(CubeQueryExecutorHelper.class.getName(),"String_Node_Str",cube);
  this.cube=(Cube)cube;
  this.simpleLevelFilters=new ArrayList();
  this.levelFilters=new ArrayList();
  this.aggrFilterHelpers=new ArrayList();
  this.dimJSFilterMap=new HashMap();
  this.dimRowForFilterMap=new HashMap();
  this.rowSort=new ArrayList();
  this.columnSort=new ArrayList();
  dimLevelsMap=new HashMap();
  IDimension[] dimension=this.cube.getDimesions();
  for (int i=0; i < dimension.length; i++) {
    ILevel[] levels=dimension[i].getHierarchy().getLevels();
    dimLevelsMap.put(dimension[i].getName(),levels);
  }
  logger.exiting(CubeQueryExecutorHelper.class.getName(),"String_Node_Str");
}
Program: 74471
Project: 74471
Buggy source:
/** 
 * @return
 * @throws DataException
 * @throws IOException
 */
private IDiskArray[] getFilterResult() throws DataException, IOException {
  IDimension[] dimensions=cube.getDimesions();
  IDiskArray[] dimPosition=new IDiskArray[dimensions.length];
  for (int i=0; i < dimPosition.length; i++) {
    Dimension dimension=(Dimension)dimensions[i];
    List jsFilters=getDimensionJSFilterList(dimension.getName());
    LevelFilterHelper filterHelper=new LevelFilterHelper(dimension,levelFilters);
    dimPosition[i]=filterHelper.getJSFilterResult(jsFilters,isBreakHierarchy);
  }
  return dimPosition;
}

Fixed version (ground truth):
/** 
 * @return
 * @throws DataException
 * @throws IOException
 */
private IDiskArray[] getFilterResult() throws DataException, IOException {
  IDimension[] dimensions=cube.getDimesions();
  IDiskArray[] dimPosition=new IDiskArray[dimensions.length];
  for (int i=0; i < dimPosition.length; i++) {
    Dimension dimension=(Dimension)dimensions[i];
    List jsFilters=getDimensionJSFilterList(dimension.getName());
    LevelFilterHelper filterHelper=new LevelFilterHelper(dimension,simpleLevelFilters,levelFilters);
    dimPosition[i]=filterHelper.getJSFilterResult(jsFilters,isBreakHierarchy);
  }
  return dimPosition;
}
Program: 74472
Project: 74472
Buggy source:
/** 
 * @param selectedObjects
 * @return
 */
public static ISelection createMutiKeySelection(Object[][] selectedObjects){
  return new MultiKeySelection(selectedObjects);
}

Fixed version (ground truth):
/** 
 * @param selectedObjects
 * @return
 */
public static ISelection createMutiKeySelection(Object[][] keys){
  return new MultiKeySelection(keys);
}
Program: 74473
Project: 74473
Buggy source:
/** 
 * @return
 * @throws DataException
 * @throws IOException
 */
private void populatePositions() throws DataException, IOException {
  if (levelFilters.isEmpty()) {
    this.dimPosition=dimension.findAll();
  }
  Map validFilterMap=getValidFilterMap();
  if (validFilterMap.isEmpty()) {
    this.dimPosition=dimension.findAll();
  }
  this.dimPosition=populateValidPositions(validFilterMap);
}

Fixed version (ground truth):
/** 
 * @return
 * @throws DataException
 * @throws IOException
 */
private void populatePositions() throws DataException, IOException {
  if (simplelevelFilters != null && simplelevelFilters.size() > 0) {
    getSimpleFilterResult();
  }
 else {
    this.dimPosition=dimension.findAll();
  }
  Map validFilterMap=getValidFilterMap();
  this.dimPosition=populateValidPositions(validFilterMap);
}
Program: 74474
Project: 74474
Buggy source:
/** 
 * @throws IOException
 * @throws DataException
 */
public LevelFilterHelper(Dimension dimension,List levelFilters) throws DataException, IOException {
  this.dimension=dimension;
  this.levelFilters=levelFilters;
  populatePositions();
}

Fixed version (ground truth):
/** 
 * @throws IOException
 * @throws DataException
 */
public LevelFilterHelper(Dimension dimension,List simpleLevelFilters,List levelFilters) throws DataException, IOException {
  this.dimension=dimension;
  this.simplelevelFilters=simpleLevelFilters;
  this.levelFilters=levelFilters;
  populatePositions();
}
Program: 74475
Project: 74475
Buggy source:
protected boolean validateTransfer(Object transfer){
  if (transfer instanceof ReportElementHandle || transfer instanceof EmbeddedImageHandle) {
    if (transfer instanceof ScalarParameterHandle && ((ScalarParameterHandle)transfer).getContainer() instanceof CascadingParameterGroupHandle) {
      return false;
    }
 else     if (transfer instanceof StyleHandle && ((StyleHandle)transfer).getContainer() instanceof ThemeHandle) {
      return false;
    }
 else {
      return true;
    }
  }
  return false;
}

Fixed version (ground truth):
protected boolean validateTransfer(Object transfer){
  if (transfer instanceof ReportElementHandle || transfer instanceof EmbeddedImageHandle) {
    if (transfer instanceof ScalarParameterHandle && ((ScalarParameterHandle)transfer).getContainer() instanceof CascadingParameterGroupHandle) {
      return false;
    }
 else     if (transfer instanceof StyleHandle && ((StyleHandle)transfer).getContainer() instanceof ThemeHandle) {
      return false;
    }
 else     if (transfer instanceof DimensionHandle || transfer instanceof LevelHandle || transfer instanceof MeasureHandle|| transfer instanceof MeasureGroupHandle) {
      return false;
    }
 else {
      return true;
    }
  }
  return false;
}
Program: 74477
Project: 74477
Buggy source:
private void outputHtmlText(IForeignContent foreign){
  Object rawValue=foreign.getRawValue();
  String text=rawValue == null ? null : rawValue.toString();
  Document doc=new TextParser().parse(text,TextParser.TEXT_TYPE_HTML);
  ReportDesignHandle design=(ReportDesignHandle)runnable.getDesignHandle();
  HTMLProcessor htmlProcessor=new HTMLProcessor(design);
  HashMap styleMap=new HashMap();
  Element body=null;
  if (doc != null) {
    NodeList bodys=doc.getElementsByTagName("String_Node_Str");
    if (bodys.getLength() > 0) {
      body=(Element)bodys.item(0);
    }
  }
  if (body != null) {
    htmlProcessor.execute(body,styleMap);
    processNodes(body,styleMap);
  }
}

Fixed version (ground truth):
private void outputHtmlText(IForeignContent foreign){
  boolean bIndent=writer.isIndent();
  writer.setIndent(false);
  Object rawValue=foreign.getRawValue();
  String text=rawValue == null ? null : rawValue.toString();
  Document doc=new TextParser().parse(text,TextParser.TEXT_TYPE_HTML);
  ReportDesignHandle design=(ReportDesignHandle)runnable.getDesignHandle();
  HTMLProcessor htmlProcessor=new HTMLProcessor(design);
  HashMap styleMap=new HashMap();
  Element body=null;
  if (doc != null) {
    NodeList bodys=doc.getElementsByTagName("String_Node_Str");
    if (bodys.getLength() > 0) {
      body=(Element)bodys.item(0);
    }
  }
  if (body != null) {
    htmlProcessor.execute(body,styleMap);
    processNodes(body,styleMap);
  }
  writer.setIndent(bIndent);
}
Program: 74478
Project: 74478
Buggy source:
public boolean next() throws IOException {
  while (!stopSign.isStopped()) {
    try {
      if (currentSegment == null) {
        return false;
      }
      Bytes combinedDimensionPosition=currentSegment.readBytes();
      currentPos=factTable.getCombinedPositionCalculator().calculateDimensionPosition(getSubDimensionIndex(),combinedDimensionPosition.bytesValue());
      for (int i=0; i < this.currentMeasures.length; i++) {
        currentMeasures[i]=DocumentObjectUtil.readValue(currentSegment,measureInfo[i].dataType);
      }
      if (computedMeasureHelper != null) {
        measureList.setMeasureValue(currentMeasures);
        currentComputedMeasures=computedMeasureHelper.computeMeasureValues(measureList);
      }
      if (!isSelectedRow()) {
        continue;
      }
 else {
        return true;
      }
    }
 catch (    EOFException e) {
      break;
    }
  }
  if (stopSign.isStopped() || !nextSegment()) {
    return false;
  }
  return next();
}

Fixed version (ground truth):
public boolean next() throws IOException {
  while (!stopSign.isStopped()) {
    try {
      if (currentSegment == null) {
        return false;
      }
      Bytes combinedDimensionPosition=currentSegment.readBytes();
      currentPos=factTable.getCombinedPositionCalculator().calculateDimensionPosition(getSubDimensionIndex(),combinedDimensionPosition.bytesValue());
      for (int i=0; i < this.currentMeasures.length; i++) {
        currentMeasures[i]=DocumentObjectUtil.readValue(currentSegment,measureInfo[i].dataType);
      }
      if (computedMeasureHelper != null) {
        measureList.setMeasureValue(currentMeasures);
        currentComputedMeasures=computedMeasureHelper.computeMeasureValues(measureList);
        if (isFirtRow) {
          if (computedMeasureInfo == null)           produceComputedMeasureInfo();
 else           setComputedMeasureDataType();
        }
      }
      if (!isSelectedRow()) {
        continue;
      }
 else {
        isFirtRow=false;
        return true;
      }
    }
 catch (    EOFException e) {
      break;
    }
  }
  if (stopSign.isStopped() || !nextSegment()) {
    return false;
  }
  return next();
}
Program: 74479
Project: 74479
Buggy source:
public MeasureInfo[] getMeasureInfo(){
  return measureInfo;
}

Fixed version (ground truth):
public MeasureInfo[] getMeasureInfo(){
  if (computedMeasureInfo == null)   produceComputedMeasureInfo();
  return computedMeasureInfo;
}
Program: 74480
Project: 74480
Buggy source:
public void testRenderTask() throws Exception {
  removeFile(TEMP_RESULT);
  removeFile(REPORT_DOCUMENT);
  createReportDocument();
  IReportDocument reportDoc=engine.openReportDocument(REPORT_DOCUMENT);
  IRenderTask task=engine.createRenderTask(reportDoc);
  task.setTimeZone(TimeZone.getTimeZone("String_Node_Str"));
  IRenderOption option=new HTMLRenderOption();
  option.setOutputFormat("String_Node_Str");
  option.setOutputFileName(TEMP_RESULT + "String_Node_Str");
  task.setRenderOption(option);
  task.render();
  assertTrue(compareFiles(TEMP_RESULT,"String_Node_Str"));
}

Fixed version (ground truth):
public void testRenderTask() throws Exception {
  createReportDocument();
  IReportDocument reportDoc=engine.openReportDocument(REPORT_DOCUMENT);
  IRenderTask task=engine.createRenderTask(reportDoc);
  task.setTimeZone(TimeZone.getTimeZone("String_Node_Str"));
  IRenderOption option=new HTMLRenderOption();
  option.setOutputFormat("String_Node_Str");
  option.setOutputFileName(TEMP_RESULT);
  task.setRenderOption(option);
  task.render();
  assertTrue(compareFiles(TEMP_RESULT,GOLDEN_RENDER));
}
Program: 74481
Project: 74481
Buggy source:
private boolean compareFiles(String src,String golden){
  boolean result=false;
  try {
    InputStream in=this.getClass().getResourceAsStream(golden);
    assert(in != null);
    byte[] buffer=new byte[in.available()];
    in.read(buffer);
    String goldenString=new String(buffer);
    File srcFile=new File(src);
    in=new FileInputStream(src);
    assert(in != null);
    buffer=new byte[in.available()];
    in.read(buffer);
    String srcString=new String(buffer);
    result=srcString.equals(goldenString);
  }
 catch (  Exception ex) {
    ex.printStackTrace();
    return false;
  }
  return result;
}

Fixed version (ground truth):
private boolean compareFiles(String src,String golden){
  boolean result=false;
  try {
    InputStream goldenInputStream=new FileInputStream(new File(golden));
    assert(goldenInputStream != null);
    StringBuffer goldenBuffer=new StringBuffer();
    byte[] buffer=new byte[5120];
    int readCount=-1;
    while ((readCount=goldenInputStream.read(buffer)) != -1) {
      goldenBuffer.append(new String(buffer));
    }
    InputStream srcInputStream=new FileInputStream(new File(golden));
    assert(srcInputStream != null);
    StringBuffer srcBuffer=new StringBuffer();
    buffer=new byte[5120];
    readCount=-1;
    while ((readCount=srcInputStream.read(buffer)) != -1) {
      srcBuffer.append(new String(buffer));
    }
    result=(srcBuffer.toString()).equals(goldenBuffer.toString());
  }
 catch (  Exception ex) {
    ex.printStackTrace();
    return false;
  }
  return result;
}
Program: 74483
Project: 74483
Buggy source:
/** 
 * @param creator
 */
public Query(org.eclipse.datatools.enablement.oda.xml.util.XMLDataInputStreamCreator creator){
  super(creator);
}

Fixed version (ground truth):
/** 
 * @param creator
 */
public Query(org.eclipse.datatools.enablement.oda.xml.util.XMLCreatorContent creator){
  super(creator);
}
Program: 74484
Project: 74484
Buggy source:
/** 
 * @param is
 * @param ri
 * @param tableName
 * @param maxRows
 * @throws OdaException
 */
public ResultSet(XMLDataInputStream is,RelationInformation ri,String tableName,int maxRows) throws OdaException {
  super(is,ri,tableName,maxRows);
}

Fixed version (ground truth):
/** 
 * @param is
 * @param ri
 * @param tableName
 * @param maxRows
 * @throws OdaException
 */
public ResultSet(XMLCreatorContent is,RelationInformation ri,String tableName,int maxRows) throws OdaException {
  super(is,ri,tableName,maxRows);
}
Program: 74485
Project: 74485
Buggy source:
/** 
 * @param rs
 * @param rinfo
 * @param is
 * @param tName
 * @throws OdaException
 */
public SaxParserConsumer(ResultSet rs,RelationInformation rinfo,XMLDataInputStream is,String tName) throws OdaException {
  super(rinfo,is,tName);
}

Fixed version (ground truth):
/** 
 * @param rs
 * @param rinfo
 * @param is
 * @param tName
 * @throws OdaException
 */
public SaxParserConsumer(ResultSet rs,RelationInformation rinfo,XMLCreatorContent is,String tName) throws OdaException {
  super(rinfo,is,tName);
}
Program: 74486
Project: 74486
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();
  }
 else {
    if (container.needClip()) {
      pageGraphic.clipRestore();
    }
  }
  currentX-=container.getX();
  currentY-=container.getY();
}

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 {
    if (container.needClip()) {
      pageGraphic.clipRestore();
    }
  }
  currentX-=getX(container);
  currentY-=getY(container);
}
Program: 74489
Project: 74489
Buggy source:
public void testToSqlTime() throws BirtException {
  Time time=DataTypeUtil.toSqlTime("String_Node_Str");
  Calendar cal=Calendar.getInstance();
  cal.clear();
  cal.set(0,0,0,12,11,25);
  Time temp=new Time(cal.getTime().getTime());
  assertEquals(time.toString(),temp.toString());
  time=DataTypeUtil.toSqlTime("String_Node_Str");
  cal=Calendar.getInstance();
  cal.clear();
  cal.set(0,0,0,18,11,25);
  temp=new Time(cal.getTime().getTime());
  assertEquals(time.toString(),temp.toString());
  try {
    DataTypeUtil.toSqlTime("String_Node_Str");
    fail("String_Node_Str");
  }
 catch (  BirtException e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
public void testToSqlTime() throws BirtException {
  Time temp=getTime(11,11,25);
  Time time=DataTypeUtil.toSqlTime("String_Node_Str");
  assertEquals(time.toString(),temp.toString());
  time=DataTypeUtil.toSqlTime("String_Node_Str");
  assertEquals(time.toString(),temp.toString());
  time=DataTypeUtil.toSqlTime("String_Node_Str");
  assertEquals(time.toString(),temp.toString());
  temp=getTime(18,11,25);
  time=DataTypeUtil.toSqlTime("String_Node_Str");
  assertEquals(time.toString(),temp.toString());
  time=DataTypeUtil.toSqlTime("String_Node_Str");
  assertEquals(time,temp);
  time=DataTypeUtil.toSqlTime("String_Node_Str");
  assertEquals(time,temp);
  failSqlTimeString("String_Node_Str");
  failSqlTimeString("String_Node_Str");
  failSqlTimeString("String_Node_Str");
  failSqlTimeString("String_Node_Str");
  failSqlTimeString("String_Node_Str");
  failSqlTimeString("String_Node_Str");
}
Program: 74490
Project: 74490
Buggy source:
/** 
 * Tests set list value when map operator is 'in'.
 * @throws Exception
 */
public void testOperatorIn() throws Exception {
  createDesign();
  StyleHandle style=designHandle.getElementFactory().newStyle("String_Node_Str");
  designHandle.getStyles().add(style);
  PropertyHandle propHandle=style.getPropertyHandle(IStyleModel.HIGHLIGHT_RULES_PROP);
  HighlightRule rule=StructureFactory.createHighlightRule();
  propHandle.addItem(rule);
  HighlightRuleHandle ruleHandle=(HighlightRuleHandle)propHandle.get(0);
  ruleHandle.setOperator(DesignChoiceConstants.MAP_OPERATOR_IN);
  List values=new ArrayList();
  values.add("String_Node_Str");
  values.add("String_Node_Str");
  ruleHandle.setValue1(values);
  ruleHandle.setTestExpression("String_Node_Str");
  HighlightRule rule2=StructureFactory.createHighlightRule();
  List values2=new ArrayList();
  values2.add("String_Node_Str");
  values2.add("String_Node_Str");
  rule2.setValue1(values);
  rule2.setTestExpression("String_Node_Str");
  rule2.setOperator(DesignChoiceConstants.MAP_OPERATOR_IN);
  propHandle.addItem(rule2);
}

Fixed version (ground truth):
/** 
 * Tests set list value when map operator is 'in'.
 * @throws Exception
 */
public void testOperatorIn() throws Exception {
  createDesign();
  StyleHandle style=designHandle.getElementFactory().newStyle("String_Node_Str");
  designHandle.getStyles().add(style);
  PropertyHandle propHandle=style.getPropertyHandle(IStyleModel.HIGHLIGHT_RULES_PROP);
  HighlightRule rule=StructureFactory.createHighlightRule();
  propHandle.addItem(rule);
  HighlightRuleHandle ruleHandle=(HighlightRuleHandle)propHandle.get(0);
  ruleHandle.setOperator(DesignChoiceConstants.MAP_OPERATOR_IN);
  List values=new ArrayList();
  values.add("String_Node_Str");
  values.add("String_Node_Str");
  ruleHandle.setValue1(values);
  ruleHandle.setTestExpression("String_Node_Str");
  HighlightRule rule2=StructureFactory.createHighlightRule();
  rule2.setProperty(StyleRule.VALUE1_MEMBER,"String_Node_Str");
  List values2=new ArrayList();
  values2.add("String_Node_Str");
  values2.add("String_Node_Str");
  rule2.setValue1(values);
  rule2.setTestExpression("String_Node_Str");
  rule2.setOperator(DesignChoiceConstants.MAP_OPERATOR_IN);
  propHandle.addItem(rule2);
}
Program: 74491
Project: 74491
Buggy source:
protected void setIntrinsicProperty(String propName,Object value){
  if (OPERATOR_MEMBER.equals(propName))   operator=(String)value;
 else   if (VALUE1_MEMBER.equals(propName))   value1=(List)value;
 else   if (VALUE2_MEMBER.equals(propName))   value2=(String)value;
 else   if (TEST_EXPR_MEMBER.equals(propName))   testExpression=(String)value;
 else   if (IS_DESIGN_TIME_MEMBER.equals(propName))   isDesignTime=(Boolean)value;
 else   super.setIntrinsicProperty(propName,value);
}

Fixed version (ground truth):
protected void setIntrinsicProperty(String propName,Object value){
  if (OPERATOR_MEMBER.equals(propName))   operator=(String)value;
 else   if (VALUE1_MEMBER.equals(propName)) {
    if (value == null) {
      value1=null;
      return;
    }
    if (value instanceof List) {
      value1=(List)value;
    }
 else {
      value1=new ArrayList();
      value1.add(value);
    }
  }
 else   if (VALUE2_MEMBER.equals(propName))   value2=(String)value;
 else   if (TEST_EXPR_MEMBER.equals(propName))   testExpression=(String)value;
 else   if (IS_DESIGN_TIME_MEMBER.equals(propName))   isDesignTime=(Boolean)value;
 else   super.setIntrinsicProperty(propName,value);
}
Program: 74492
Project: 74492
Buggy source:
/** 
 * Prepare response
 * @throws ReportServiceException
 * @throws RemoteException
 */
protected void prepareResponse() throws ReportServiceException, RemoteException {
  TOC toc=new TOC();
  List children=__node.getChildren();
  if (children != null && children.size() > 0) {
    TOC[] childTOCNodes=new TOC[children.size()];
    for (int i=0; i < children.size(); i++) {
      ToC child=(ToC)children.get(i);
      childTOCNodes[i]=new TOC();
      childTOCNodes[i].setId(child.getID());
      childTOCNodes[i].setDisplayName(child.getDisplayName());
      childTOCNodes[i].setBookmark(child.getBookmark());
      childTOCNodes[i].setStyle(child.getStyle());
      childTOCNodes[i].setIsLeaf(new Boolean(child.getChildren() == null || child.getChildren().size() <= 0));
    }
    toc.setChild(childTOCNodes);
  }
  Data data=new Data();
  data.setTOC(toc);
  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):
/** 
 * Prepare response
 * @throws ReportServiceException
 * @throws RemoteException
 */
protected void prepareResponse() throws ReportServiceException, RemoteException {
  TOC toc=new TOC();
  List children=__node.getChildren();
  if (children != null && children.size() > 0) {
    TOC[] childTOCNodes=new TOC[children.size()];
    for (int i=0; i < children.size(); i++) {
      ToC child=(ToC)children.get(i);
      childTOCNodes[i]=new TOC();
      childTOCNodes[i].setId(child.getID());
      childTOCNodes[i].setDisplayName(ParameterAccessor.htmlEncode(child.getDisplayName()));
      childTOCNodes[i].setBookmark(child.getBookmark());
      childTOCNodes[i].setStyle(child.getStyle());
      childTOCNodes[i].setIsLeaf(new Boolean(child.getChildren() == null || child.getChildren().size() <= 0));
    }
    toc.setChild(childTOCNodes);
  }
  Data data=new Data();
  data.setTOC(toc);
  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: 74493
Project: 74493
Buggy source:
protected static Object convertToType(Object value,String type){
  try {
    if (DesignChoiceConstants.PARAM_TYPE_BOOLEAN.equals(type)) {
      return DataTypeUtil.toBoolean(value);
    }
 else     if (DesignChoiceConstants.PARAM_TYPE_DATETIME.equals(type)) {
      return DataTypeUtil.toDate(value);
    }
 else     if (DesignChoiceConstants.PARAM_TYPE_DATE.equals(type)) {
      return DataTypeUtil.toSqlDate(value);
    }
 else     if (DesignChoiceConstants.PARAM_TYPE_TIME.equals(type)) {
      return DataTypeUtil.toSqlTime(value);
    }
 else     if (DesignChoiceConstants.PARAM_TYPE_DECIMAL.equals(type)) {
      return DataTypeUtil.toBigDecimal(value);
    }
 else     if (DesignChoiceConstants.PARAM_TYPE_FLOAT.equals(type)) {
      return DataTypeUtil.toDouble(value);
    }
 else     if (DesignChoiceConstants.PARAM_TYPE_STRING.equals(type)) {
      return DataTypeUtil.toString(value);
    }
 else     if (DesignChoiceConstants.PARAM_TYPE_INTEGER.equals(type)) {
      return DataTypeUtil.toInteger(value);
    }
    return value;
  }
 catch (  BirtException e) {
    Logger.getLogger(EngineTask.class.getName()).log(Level.SEVERE,e.getLocalizedMessage(),e);
  }
  return null;
}

Fixed version (ground truth):
protected Object convertToType(Object value,String type){
  try {
    return convertParameterType(value,type);
  }
 catch (  BirtException e) {
    log.log(Level.SEVERE,e.getLocalizedMessage(),e);
  }
  return null;
}
Program: 74494
Project: 74494
Buggy source:
public Object getValue(IResultIterator resultIterator) throws BirtException {
  Object value=resultIterator.getString(valueColumnName);
  return EngineTask.convertToType(value,valueType);
}

Fixed version (ground truth):
public Object getValue(IResultIterator resultIterator) throws BirtException {
  Object value=resultIterator.getString(valueColumnName);
  return EngineTask.convertParameterType(value,valueType);
}
Program: 74495
Project: 74495
Buggy source:
public void tearDown(){
  if (engine != null) {
    engine.shutdown();
  }
  removeFile(REPORT_DESIGN);
}

Fixed version (ground truth):
public void tearDown(){
  destroy();
}
Program: 74496
Project: 74496
Buggy source:
public void setUp() throws Exception {
  removeFile(REPORT_DESIGN);
  copyResource(REPORT_DESIGN_RESOURCE,REPORT_DESIGN);
  engine=createReportEngine();
  runnable=engine.openReportDesign(REPORT_DESIGN);
  gpdTask=engine.createGetParameterDefinitionTask(runnable);
}

Fixed version (ground truth):
public void setUp() throws Exception {
  String reportDesign=REPORT_DESIGN_RESOURCE;
  initialize(reportDesign);
}
Program: 74497
Project: 74497
Buggy source:
/** 
 * @param dsAndDs
 * @return
 */
private Object getKey(DataSourceAndDataSet dsAndDs){
  for (Iterator it=cacheMap.keySet().iterator(); it.hasNext(); ) {
    DataSourceAndDataSet temp=(DataSourceAndDataSet)it.next();
    if (temp.isDataSourceDataSetEqual(dsAndDs,false)) {
      return temp;
    }
  }
  return null;
}

Fixed version (ground truth):
/** 
 * @param dsAndDs
 * @return
 */
private Object getKey(DataSourceAndDataSet dsAndDs){
synchronized (cacheMap) {
    for (Iterator it=cacheMap.keySet().iterator(); it.hasNext(); ) {
      DataSourceAndDataSet temp=(DataSourceAndDataSet)it.next();
      if (temp.isDataSourceDataSetEqual(dsAndDs,false)) {
        return temp;
      }
    }
    return null;
  }
}
Program: 74498
Project: 74498
Buggy source:
/** 
 * @param appContext 
 * @param collection 
 * @param baseDataSetDesign 
 * @param baseDataSourceDesign 
 * @return
 */
boolean doesSaveToCache(DataSourceAndDataSet dsAndDs,int mode,IBaseDataSourceDesign baseDataSourceDesign,IBaseDataSetDesign baseDataSetDesign,Collection parameterHints,Map appContext){
  Object cacheObject=null;
synchronized (cacheMap) {
    cacheObject=cacheMap.get(dsAndDs);
  }
  if (cacheObject != null) {
    return needSaveToCache(cacheObject);
  }
 else {
synchronized (cacheMap) {
      cacheObject=(String)cacheMap.get(dsAndDs);
      if (cacheObject != null) {
        return needSaveToCache(cacheObject);
      }
      IDataSetCacheObject dsCacheObject=null;
      String cacheDir=(String)cacheDirMap.get(baseDataSetDesign);
      if (baseDataSetDesign instanceof IIncreCacheDataSetDesign) {
        dsCacheObject=(IDataSetCacheObject)new IncreDataSetCacheObject(cacheDir);
      }
 else {
switch (mode) {
case DataEngineContext.CACHE_MODE_IN_MEMORY:
          dsCacheObject=(IDataSetCacheObject)new MemoryDataSetCacheObject();
        break;
case DataEngineContext.CACHE_MODE_IN_DISK:
      String tempRootDir=CacheUtil.createTempRootDir(tempDir);
    String sessionTempDir=CacheUtil.createSessionTempDir(tempRootDir);
  dsCacheObject=(IDataSetCacheObject)new DiskDataSetCacheObject(sessionTempDir);
break;
default :
return false;
}
}
cacheMap.put(dsAndDs,dsCacheObject);
return true;
}
}
}

Fixed version (ground truth):
/** 
 * @param appContext 
 * @param collection 
 * @param baseDataSetDesign 
 * @param baseDataSourceDesign 
 * @return
 * @throws DataException 
 */
boolean doesSaveToCache(DataSourceAndDataSet dsAndDs,int mode,IBaseDataSourceDesign baseDataSourceDesign,IBaseDataSetDesign baseDataSetDesign,Collection parameterHints,Map appContext) throws DataException {
  Object cacheObject=null;
synchronized (cacheMap) {
    cacheObject=cacheMap.get(dsAndDs);
  }
  if (cacheObject != null) {
    return needSaveToCache(cacheObject);
  }
 else {
synchronized (cacheMap) {
      cacheObject=(String)cacheMap.get(dsAndDs);
      if (cacheObject != null) {
        return needSaveToCache(cacheObject);
      }
      IDataSetCacheObject dsCacheObject=null;
      String cacheDir=(String)cacheDirMap.get(baseDataSetDesign);
      if (baseDataSetDesign instanceof IIncreCacheDataSetDesign) {
        dsCacheObject=(IDataSetCacheObject)new IncreDataSetCacheObject(cacheDir);
      }
 else {
switch (mode) {
case DataEngineContext.CACHE_MODE_IN_MEMORY:
          dsCacheObject=(IDataSetCacheObject)new MemoryDataSetCacheObject();
        break;
case DataEngineContext.CACHE_MODE_IN_DISK:
      String tempRootDir=CacheUtil.createTempRootDir(tempDir);
    String sessionTempDir=CacheUtil.createSessionTempDir(tempRootDir);
  dsCacheObject=(IDataSetCacheObject)new DiskDataSetCacheObject(sessionTempDir);
break;
default :
return false;
}
}
cacheMap.put(dsAndDs,dsCacheObject);
return true;
}
}
}
Program: 74499
Project: 74499
Buggy source:
/** 
 * @return
 */
public boolean doesSaveToCache(){
  if (needsToCache(dataSetDesign,cacheOption,alwaysCacheRowCount) == false)   return false;
  return cacheMapManager.doesSaveToCache(DataSourceAndDataSet.newInstance(this.dataSourceDesign,this.dataSetDesign,this.parameterHints),this.mode,this.dataSourceDesign,this.dataSetDesign,this.parameterHints,this.appContext);
}

Fixed version (ground truth):
/** 
 * @return
 * @throws DataException 
 */
public boolean doesSaveToCache() throws DataException {
  if (needsToCache(dataSetDesign,cacheOption,alwaysCacheRowCount) == false)   return false;
  return cacheMapManager.doesSaveToCache(DataSourceAndDataSet.newInstance(this.dataSourceDesign,this.dataSetDesign,this.parameterHints),this.mode,this.dataSourceDesign,this.dataSetDesign,this.parameterHints,this.appContext);
}
Program: 74500
Project: 74500
Buggy source:
/** 
 * @return session temp dir
 * @throws IOException 
 */
public static String createSessionTempDir(String tempRootDir){
  final String prefix="String_Node_Str";
  File sessionFile=null;
synchronized (cacheCounter2) {
    String sessionTempDir=tempRootDir + File.separator + prefix+ System.currentTimeMillis()+ cacheCounter2.intValue();
    cacheCounter2=new Integer(cacheCounter2.intValue() + 1);
    sessionFile=new File(sessionTempDir);
    int i=0;
    while (sessionFile.exists() || !sessionFile.mkdir()) {
      i++;
      sessionTempDir=sessionTempDir + "String_Node_Str" + i;
      sessionFile=new File(sessionTempDir);
    }
    sessionFile.deleteOnExit();
  }
  return getCanonicalPath(sessionFile);
}

Fixed version (ground truth):
/** 
 * @return session temp dir
 * @throws DataException 
 * @throws IOException 
 */
public static String createSessionTempDir(String tempRootDir) throws DataException {
  final String prefix="String_Node_Str";
  File sessionFile=null;
synchronized (cacheCounter2) {
    String sessionTempDir=tempRootDir + File.separator + prefix+ System.currentTimeMillis()+ cacheCounter2.intValue();
    cacheCounter2=new Integer(cacheCounter2.intValue() + 1);
    sessionFile=new File(sessionTempDir);
    int i=0;
    while (sessionFile.exists() || !sessionFile.mkdir()) {
      i++;
      sessionTempDir=sessionTempDir + "String_Node_Str" + i;
      sessionFile=new File(sessionTempDir);
      if (i > MAX_DIR_CREATION_ATTEMPT)       throw new DataException(ResourceConstants.FAIL_TO_CREATE_TEMP_DIR,sessionFile.getAbsolutePath());
    }
    sessionFile.deleteOnExit();
  }
  return getCanonicalPath(sessionFile);
}
Program: 74501
Project: 74501
Buggy source:
/** 
 * @return temp directory string, this folder is used to store the temporaryresult in merge sort
 */
private String getTempDirStr(){
  return getSessionTempDirStr() + File.separator + "String_Node_Str";
}

Fixed version (ground truth):
/** 
 * @return temp directory string, this folder is used to store the temporaryresult in merge sort
 * @throws DataException 
 */
private String getTempDirStr() throws DataException {
  return getSessionTempDirStr() + File.separator + "String_Node_Str";
}
Program: 74502
Project: 74502
Buggy source:
/** 
 * @return goal file of the end result, 
 */
private String getGoalFileStr(){
  return getSessionTempDirStr() + File.separator + "String_Node_Str";
}

Fixed version (ground truth):
/** 
 * @return goal file of the end result, 
 * @throws DataException 
 */
private String getGoalFileStr() throws DataException {
  return getSessionTempDirStr() + File.separator + "String_Node_Str";
}
Program: 74503
Project: 74503
Buggy source:
/** 
 * @return infoMap, including below informationtempDir, to generated temp file in DiskMergeSort goalFile, to generate the end result file dataCountOfUnit, to indicate how many rows can be loaded into memory
 */
private Map getInfoMap(){
  Map infoMap=new HashMap();
  infoMap.put("String_Node_Str",getTempDirStr());
  goalFileStr=getGoalFileStr();
  infoMap.put("String_Node_Str",goalFileStr);
  infoMap.put("String_Node_Str","String_Node_Str" + MemoryCacheRowCount);
  return infoMap;
}

Fixed version (ground truth):
/** 
 * @return infoMap, including below informationtempDir, to generated temp file in DiskMergeSort goalFile, to generate the end result file dataCountOfUnit, to indicate how many rows can be loaded into memory
 * @throws DataException 
 */
private Map getInfoMap() throws DataException {
  Map infoMap=new HashMap();
  infoMap.put("String_Node_Str",getTempDirStr());
  goalFileStr=getGoalFileStr();
  infoMap.put("String_Node_Str",goalFileStr);
  infoMap.put("String_Node_Str","String_Node_Str" + MemoryCacheRowCount);
  return infoMap;
}
Program: 74504
Project: 74504
Buggy source:
/** 
 * @return temp directory string, this folder name is unique and thendifferent session will not influence each other, which can support multi-thread
 */
private String getSessionTempDirStr(){
  if (sessionRootDirStr != null)   return sessionRootDirStr;
  if (tempRootDirStr == null)   tempRootDirStr=createTempRootDir();
  sessionRootDirStr=CacheUtil.createSessionTempDir(tempRootDirStr);
  return sessionRootDirStr;
}

Fixed version (ground truth):
/** 
 * @return temp directory string, this folder name is unique and thendifferent session will not influence each other, which can support multi-thread
 * @throws DataException 
 */
private String getSessionTempDirStr() throws DataException {
  if (sessionRootDirStr != null)   return sessionRootDirStr;
  if (tempRootDirStr == null)   tempRootDirStr=createTempRootDir();
  sessionRootDirStr=CacheUtil.createSessionTempDir(tempRootDirStr);
  return sessionRootDirStr;
}
Program: 74505
Project: 74505
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;
  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.getClass().isAssignableFrom(Timestamp.class)) {
      return TYPE_TIME_STAMP;
    }
    if (obValue.getClass().isAssignableFrom(Time.class)) {
      return TYPE_TIME;
    }
    if (obValue.getClass().isAssignableFrom(Date.class)) {
      return TYPE_DATE;
    }
    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 (Timestamp.class.isAssignableFrom(obValue.getClass())) {
      return TYPE_TIME_STAMP;
    }
    if (Time.class.isAssignableFrom(obValue.getClass())) {
      return TYPE_TIME;
    }
    if (Date.class.isAssignableFrom(obValue.getClass())) {
      return TYPE_DATE;
    }
    if (obValue instanceof Serializable) {
      return TYPE_SERIALIZABLE;
    }
    return -1;
  }
  return indexOb.intValue();
}
Program: 74506
Project: 74506
Buggy source:
/** 
 * @param dataSet
 * @param refresh
 * @param useColumnHints Only applicable if the list is refreshed.
 * @return
 */
public DataSetViewData[] getColumns(DataSetHandle dataSet,boolean refresh,boolean useColumnHints,boolean suppressErrorMessage){
  if (dataSet == null) {
    return new DataSetViewData[0];
  }
  DataSetViewData[] columns=null;
  try {
    DataSessionContext context=new DataSessionContext(DataSessionContext.MODE_DIRECT_PRESENTATION,dataSet.getModuleHandle());
    DataRequestSession session=DataRequestSession.newSession(context);
    columns=(DataSetViewData[])htColumns.get(dataSet);
    if (columns == null || refresh) {
      columns=this.populateAllOutputColumns(dataSet,session);
      htColumns.put(dataSet,columns);
    }
    session.shutdown();
  }
 catch (  BirtException e) {
    if (!suppressErrorMessage) {
      ExceptionHandler.handle(e);
    }
    columns=null;
  }
  if (columns == null) {
    columns=new DataSetViewData[]{};
    updateModel(dataSet,columns);
    htColumns.put(dataSet,columns);
  }
  return columns;
}

Fixed version (ground truth):
/** 
 * @param dataSet
 * @param refresh
 * @param useColumnHints Only applicable if the list is refreshed.
 * @return
 */
public DataSetViewData[] getColumns(DataSetHandle dataSet,boolean refresh,boolean useColumnHints,boolean suppressErrorMessage){
  if (dataSet == null) {
    return new DataSetViewData[0];
  }
  DataSetViewData[] columns=null;
  try {
    DataSessionContext context=new DataSessionContext(DataSessionContext.MODE_DIRECT_PRESENTATION,dataSet.getModuleHandle());
    DataRequestSession session=DataRequestSession.newSession(context);
    columns=(DataSetViewData[])htColumns.get(dataSet);
    if (columns == null || refresh) {
      columns=this.populateAllOutputColumns(dataSet,session);
      htColumns.put(dataSet,columns);
    }
    session.shutdown();
  }
 catch (  BirtException e) {
    if (!suppressErrorMessage) {
      ExceptionHandler.handle(e);
    }
    columns=null;
  }
  if (columns == null) {
    columns=new DataSetViewData[]{};
    htColumns.put(dataSet,columns);
  }
  return columns;
}
Program: 74508
Project: 74508
Buggy source:
public void moveTo(int index) throws DataException {
  if (index < 0 || index >= this.rowCount)   throw new DataException(ResourceConstants.INVALID_ROW_INDEX,new Integer(index));
 else   if (index < currRowIndex)   throw new DataException(ResourceConstants.BACKWARD_SEEK_ERROR);
 else   if (index == currRowIndex)   return;
  this.currRowIndex=index;
}

Fixed version (ground truth):
public void moveTo(int index) throws DataException {
  if (index < 0 || index >= this.rowCount)   throw new DataException(ResourceConstants.INVALID_ROW_INDEX,new Integer(index));
 else   if (index < currRowIndex)   throw new DataException(ResourceConstants.BACKWARD_SEEK_ERROR);
 else   if (index == currRowIndex)   return;
  while (this.currRowIndex < index) {
    this.next();
  }
}