nus-yam/ex-repair huggingface dataset:
Program: 74509
Project: 74509
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 instanceof Serializable) {
      return TYPE_SERIALIZABLE;
    }
    return -1;
  }
  return indexOb.intValue();
}

Fixed version (ground truth):
/** 
 * from object class to its type index value
 * @param obValue
 * @return
 */
private static int getTypeIndex(Object obValue){
  if (obValue == null)   return TYPE_NULL;
  if (obValue instanceof String) {
    if (isLongString((String)obValue)) {
      return TYPE_LONG_STRING;
    }
 else {
      return TYPE_STRING;
    }
  }
  Integer indexOb=(Integer)type2IndexMap.get(obValue.getClass());
  if (indexOb == null) {
    if (obValue instanceof Map) {
      return TYPE_MAP;
    }
    if (obValue instanceof List) {
      return TYPE_LIST;
    }
    if (obValue instanceof Scriptable) {
      return TYPE_JSObject;
    }
    if (obValue.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();
}
Program: 74513
Project: 74513
Buggy source:
private boolean layoutChildNode(IReportItemExecutor childExecutor){
  boolean hasNextPage=false;
  IContent childContent=childExecutor.execute();
  PDFAbstractLM childLM=getFactory().createLayoutManager(this,childContent,childExecutor);
  hasNextPage=childLM.layout();
  if (hasNextPage && !childLM.isFinished()) {
    child=childLM;
  }
  return hasNextPage;
}

Fixed version (ground truth):
private boolean layoutChildNode(IReportItemExecutor childExecutor){
  boolean hasNextPage=false;
  IContent childContent=childExecutor.execute();
  PDFAbstractLM childLM=getFactory().createLayoutManager(this,childContent,childExecutor);
  hasNextPage=childLM.layout();
  if (hasNextPage && !childLM.isFinished()) {
    child=childLM;
  }
 else {
    child=null;
  }
  return hasNextPage;
}
Program: 74514
Project: 74514
Buggy source:
int getType();

Fixed version (ground truth):
/** 
 * Get the type of the AutoText Content.  <p> The return value must be on of the predefines. <li><code>TOTAL_PAGE</code></li> <li><code>PAGE_NUMBER</code></li>
 */
int getType();
Program: 74515
Project: 74515
Buggy source:
void setType(int type);

Fixed version (ground truth):
/** 
 * Set the type of the AutoText Content. This type must be one of the predefines. <li><code>TOTAL_PAGE</code></li> <li><code>PAGE_NUMBER</code></li>
 * @param type the type of the AutoText Content.
 */
void setType(int type);
Program: 74516
Project: 74516
Buggy source:
void setBandType(int bandType);

Fixed version (ground truth):
/** 
 * Set the type of the band content. The value of parameter <code>bandType</code> must be one of the following predefined values in class <code>IBandContent</code>: <li><code>BAND_HEADER</code></li> <li><code>BAND_FOOTER</code></li> <li><code>GROUP_HEADER</code></li> <li><code>GROUP_FOOTER</code></li> <li><code>BAND_DETAIL</code></li>
 * @param bandType the type of the band content.
 */
void setBandType(int bandType);
Program: 74517
Project: 74517
Buggy source:
int getBandType();

Fixed version (ground truth):
/** 
 * Get the type of the band content. The return result of this method is in <code>int</code> format, and the <code>int</code> value must be one of the following predefined values in class <code>IBandContent</code>: <li><code>BAND_HEADER</code></li> <li><code>BAND_FOOTER</code></li> <li><code>GROUP_HEADER</code></li> <li><code>GROUP_FOOTER</code></li> <li><code>BAND_DETAIL</code></li>
 * @return type of the band content.
 */
int getBandType();
Program: 74518
Project: 74518
Buggy source:
String getGroupID();

Fixed version (ground truth):
/** 
 * Get the group id if the band content is in some group. This method will return <code>null</code> when the band content is not a group header and group footer.
 * @return the group id.
 */
String getGroupID();
Program: 74519
Project: 74519
Buggy source:
Object getValue();

Fixed version (ground truth):
/** 
 * Get the value of the data content.
 * @return the value of the data content.
 */
Object getValue();
Program: 74520
Project: 74520
Buggy source:
String getHelpText();

Fixed version (ground truth):
/** 
 * Get the help text of the data content.
 * @return the help text.
 */
String getHelpText();
Program: 74521
Project: 74521
Buggy source:
String getLabelKey();

Fixed version (ground truth):
/** 
 * Get the label key of the data content.
 * @return the label key of the data content.
 */
String getLabelKey();
Program: 74522
Project: 74522
Buggy source:
void setValue(Object value);

Fixed version (ground truth):
/** 
 * Set the value of the data content.
 * @param value the value of the data content.
 */
void setValue(Object value);
Program: 74523
Project: 74523
Buggy source:
void setLabelKey(String key);

Fixed version (ground truth):
/** 
 * Set the label key of the data content.
 * @param key the label key of the data content.
 */
void setLabelKey(String key);
Program: 74524
Project: 74524
Buggy source:
void setLabelText(String text);

Fixed version (ground truth):
/** 
 * Set the label text of the data content.
 * @param text the label text of the data content.
 */
void setLabelText(String text);
Program: 74525
Project: 74525
Buggy source:
String getHelpKey();

Fixed version (ground truth):
/** 
 * Get the help key of the data content. 
 * @return the help key.
 */
String getHelpKey();
Program: 74526
Project: 74526
Buggy source:
String getLabelText();

Fixed version (ground truth):
/** 
 * Get the label text of the data content.
 * @return the label text of the data content.
 */
String getLabelText();
Program: 74527
Project: 74527
Buggy source:
/** 
 * @return a set of name/value pairs for running the report in adrillthrough link. 
 */
Map getParameterBindings();

Fixed version (ground truth):
/** 
 * Get a set of name/value pairs for running the target report in a drillthrough link.
 * @return a set of name/value pairs for running the target report in adrillthrough link.
 */
Map getParameterBindings();
Program: 74528
Project: 74528
Buggy source:
/** 
 * If action type is drillthrough, set the report name.
 * @param reportName
 */
void setReportName(String reportName);

Fixed version (ground truth):
/** 
 * Set the target report name if the action type is drillthrough which is predefined.
 * @param reportName the report name
 */
void setReportName(String reportName);
Program: 74529
Project: 74529
Buggy source:
/** 
 * Set the bookmark of this drillThrough if action type is drillthrough. 
 * @param bookmark
 */
void setBookmark(String bookmark);

Fixed version (ground truth):
/** 
 * Set the bookmark type of this drillthrough action.
 * @param bookmark <code>true</code>, the target element is a bookmark. or <code>false</code>, the target element is indicated to be a toc.
 */
void setBookmark(String bookmark);
Program: 74530
Project: 74530
Buggy source:
void setParameterBindings(Map parameterBindings);

Fixed version (ground truth):
/** 
 * Set a set of name/value pairs for running the target report in a drillthrough link.
 * @param parameterBindings a set of name/value pairs for running the report in a drillthrough link.
 */
void setParameterBindings(Map parameterBindings);
Program: 74531
Project: 74531
Buggy source:
/** 
 * @return the type of the target report file.
 */
public String getTargetFileType();

Fixed version (ground truth):
/** 
 * Get the type of the target file.
 * @return the type of the target report file.
 */
public String getTargetFileType();
Program: 74532
Project: 74532
Buggy source:
/** 
 * @return a set of name/value pairs for searching the report in adrillthrough link.
 */
Map getSearchCriteria();

Fixed version (ground truth):
/** 
 * Get a set of name/value pairs for searching the target report in a drillthrough link.
 * @return a set of name/value pairs for searching the target report in adrillthrough link.
 */
Map getSearchCriteria();
Program: 74533
Project: 74533
Buggy source:
/** 
 * @return the targetWindow string if action type is drillthrough.
 */
String getTargetWindow();

Fixed version (ground truth):
/** 
 * Get the target window.
 * @return the targetWindow string if action type is drillthrough.
 */
String getTargetWindow();
Program: 74534
Project: 74534
Buggy source:
/** 
 * @return the report name if action type is drillthrough.
 */
String getReportName();

Fixed version (ground truth):
/** 
 * Get the target report name if the action type is drillthrough which is predefined.
 * @return the report name.
 */
String getReportName();
Program: 74535
Project: 74535
Buggy source:
/** 
 * @return the bookmark string if the bookmark type is Bookmark and action type is drillthrough.NULL if  the bookmark type is TOC and action type is drillthrough.
 */
String getBookmark();

Fixed version (ground truth):
/** 
 * Get the bookmark.
 * @return the bookmark string if the bookmark type is Bookmark and actiontype is drillthrough. Return <code>null</code> if the bookmark type is TOC and action type is drillthrough.
 */
String getBookmark();
Program: 74536
Project: 74536
Buggy source:
void setFormat(String format);

Fixed version (ground truth):
/** 
 * set the format of the output report.
 * @param format the format of the output report.
 */
void setFormat(String format);
Program: 74537
Project: 74537
Buggy source:
/** 
 * Sets target report file type for a drill-through action.
 */
public void setTargetFileType(String targetFileType);

Fixed version (ground truth):
/** 
 * Sets the type of target report file for a drill-through action.
 * @param targetFileType the type of the target file
 */
public void setTargetFileType(String targetFileType);
Program: 74538
Project: 74538
Buggy source:
void setSearchCriteria(Map searchCriteria);

Fixed version (ground truth):
/** 
 * Set a set of name/value pairs for searching the target report in a drillthrough link.
 * @param searchCriteria a set of name/value pairs for searching the report in a drillthrough link.
 */
void setSearchCriteria(Map searchCriteria);
Program: 74539
Project: 74539
Buggy source:
/** 
 * @return the format of output report if action type is drillthrough. 
 */
String getFormat();

Fixed version (ground truth):
/** 
 * Get the format of the target report if the action type is drillthrough. This format is used for building the URL when explorer between reports, running the target report and related process.
 * @return the format of output report if action type is drillthrough.
 */
String getFormat();
Program: 74540
Project: 74540
Buggy source:
void setTargetWindow(String target);

Fixed version (ground truth):
/** 
 * Set the target window in string format.
 * @param target the target window.
 */
void setTargetWindow(String target);
Program: 74541
Project: 74541
Buggy source:
void setBookmarkType(boolean isBookmark);

Fixed version (ground truth):
/** 
 * Set the type of bookmark.  <code>true</code>, is a bookmark. <code>false</code>, indicated to be a toc.
 * @param <code>isBookmark</code> the bookmark type is toc or not.
 */
void setBookmarkType(boolean isBookmark);
Program: 74542
Project: 74542
Buggy source:
/** 
 * @return the bookmark type set in the drillThrough if action type is drillthrough. True, the bookmark is a bookmark. False, the bookmark is indicated to be a toc.  
 */
boolean isBookmark();

Fixed version (ground truth):
/** 
 * Return the bookmark type set in the drillthrough action. The return result indicated the target element is a toc or not.
 * @return <code>true</code>, the target element is a bookmark.<code>false</code>, the target element is indicated to be a toc.
 */
boolean isBookmark();
Program: 74544
Project: 74544
Buggy source:
public void setDataType(Class dataType){
  assert(dataType == Integer.class || dataType == Double.class || dataType == String.class || dataType == BigDecimal.class || dataType == java.util.Date.class || dataType == java.sql.Date.class || dataType == Time.class || dataType == Timestamp.class || dataType == IBlob.class || dataType == IClob.class || dataType == Boolean.class);
  m_dataType=dataType;
}

Fixed version (ground truth):
public void setDataType(Class dataType){
  m_dataType=dataType;
}
Program: 74545
Project: 74545
Buggy source:
/** 
 * @param originalBindingName
 * @param availableHandles
 * @param referredBindings
 * @return
 */
private static boolean acceptindirectReferredBindings(List originalBindingName,List availableHandles,List referredBindings){
  try {
    List candidateBindings=new ArrayList();
    for (int i=0; i < referredBindings.size(); i++) {
      IColumnBinding cb=(IColumnBinding)referredBindings.get(i);
      for (int j=0; j < availableHandles.size(); j++) {
        IBinding binding=(IBinding)availableHandles.get(j);
        if (originalBindingName.contains(binding.getBindingName()))         continue;
        if (binding.getBindingName().equals(cb.getResultSetColumnName()))         candidateBindings.add(binding);
      }
    }
    for (int i=0; i < candidateBindings.size(); i++) {
      ComputedColumnHandle handle=(ComputedColumnHandle)candidateBindings.get(i);
      if (!acceptBinding(handle,availableHandles,originalBindingName))       return false;
    }
    return true;
  }
 catch (  Exception e) {
    return false;
  }
}

Fixed version (ground truth):
/** 
 * @param originalBindingName
 * @param availableHandles
 * @param referredBindings
 * @return
 */
private static boolean acceptindirectReferredBindings(List originalBindingName,List availableHandles,List referredBindings){
  try {
    List candidateBindings=new ArrayList();
    for (int i=0; i < referredBindings.size(); i++) {
      IColumnBinding cb=(IColumnBinding)referredBindings.get(i);
      for (int j=0; j < availableHandles.size(); j++) {
        ComputedColumnHandle binding=(ComputedColumnHandle)availableHandles.get(j);
        if (originalBindingName.contains(binding.getName()))         continue;
        if (binding.getName().equals(cb.getResultSetColumnName()))         candidateBindings.add(binding);
      }
    }
    for (int i=0; i < candidateBindings.size(); i++) {
      ComputedColumnHandle handle=(ComputedColumnHandle)candidateBindings.get(i);
      if (!acceptBinding(handle,availableHandles,originalBindingName))       return false;
    }
    return true;
  }
 catch (  Exception e) {
    return false;
  }
}
Program: 74547
Project: 74547
Buggy source:
/** 
 * Get report locale from a given string.
 * @param locale locale string
 * @return report locale
 */
public static Locale getLocaleFromString(String locale){
  if (locale == null || locale.length() <= 0) {
    return null;
  }
  int index=locale.indexOf('_');
  if (index != -1) {
    String language=locale.substring(0,index);
    String country=locale.substring(index + 1);
    return new Locale(language,country);
  }
  return new Locale(locale);
}

Fixed version (ground truth):
/** 
 * Get report locale from a given string.
 * @param locale locale string
 * @return report locale
 */
public static Locale getLocaleFromString(String locale){
  if (locale == null || locale.length() <= 0) {
    return null;
  }
  String[] sp=locale.split("String_Node_Str");
  if (sp.length == 1) {
    return new Locale(locale);
  }
 else   if (sp.length == 2) {
    return new Locale(sp[0],sp[1]);
  }
 else {
    return new Locale(sp[0],sp[1],sp[2]);
  }
}
Program: 74548
Project: 74548
Buggy source:
/** 
 * Notice the return value of this function is IResultObject. The null value indicates the cursor exceeds the end of result set.
 * @return next result data
 * @throws DataException
 */
public IResultObject next() throws DataException {
  IResultObject ro=this.rowResultSet.next();
  if (ro == null)   return null;
  Object[] objs=new Object[this.resultClass.getFieldCount()];
  if (objs.length > 0) {
    int roFieldCount=ro.getResultClass().getFieldCount();
    for (int i=0; i < objs.length; i++) {
      if (i + 1 <= roFieldCount)       objs[i]=ro.getFieldValue(i + 1);
 else       objs[i]=null;
    }
  }
  return new ResultObject(resultClass,objs);
}

Fixed version (ground truth):
/** 
 * Notice the return value of this function is IResultObject. The null value indicates the cursor exceeds the end of result set.
 * @param stopSign
 * @return next result data
 * @throws DataException
 */
public IResultObject next(StopSign stopSign) throws DataException {
  IResultObject ro=this.rowResultSet.next(stopSign);
  if (ro == null)   return null;
  Object[] objs=new Object[this.resultClass.getFieldCount()];
  if (objs.length > 0) {
    int roFieldCount=ro.getResultClass().getFieldCount();
    for (int i=0; i < objs.length; i++) {
      if (i + 1 <= roFieldCount)       objs[i]=ro.getFieldValue(i + 1);
 else       objs[i]=null;
    }
  }
  return new ResultObject(resultClass,objs);
}
Program: 74549
Project: 74549
Buggy source:
/** 
 * Notice the return value of this function is IResultObject. The null value indicates the cursor exceeds the end of result set.
 * @return next result data
 * @throws DataException
 */
IResultObject next() throws DataException ;

Fixed version (ground truth):
/** 
 * Notice the return value of this function is IResultObject. The null value indicates the cursor exceeds the end of result set.
 * @param stopSign
 * @return next result data
 * @throws DataException
 */
IResultObject next(StopSign stopSign) throws DataException ;
Program: 74550
Project: 74550
Buggy source:
/** 
 * Fetch data from Oda or Odi. After the fetch is done, the cursor must stay at the row which is fetched.
 * @return IResultObject
 * @throws DataException
 */
IResultObject fetch() throws DataException {
  try {
    if (odaResultSet != null) {
      return odaResultSet.fetch();
    }
    if (datasetCache != null) {
      return datasetCache.fetch();
    }
 else     if (customDataSet != null) {
      return customDataSet.fetch();
    }
 else     if (resultIterator != null) {
      if (!riStarted)       riStarted=true;
 else       this.resultIterator.next();
      return this.resultIterator.getCurrentResult();
    }
 else     if (roReader != null) {
      return roReader.fetch();
    }
 else     if (populator != null) {
      return populator.next();
    }
 else {
      return resultSetCache.fetch();
    }
  }
 catch (  IllegalArgumentException e) {
    throw new DataException(e.getLocalizedMessage());
  }
}

Fixed version (ground truth):
/** 
 * Fetch data from Oda or Odi. After the fetch is done, the cursor must stay at the row which is fetched.
 * @param stopSign
 * @return
 * @throws DataException
 */
IResultObject fetch(StopSign stopSign) throws DataException {
  try {
    if (odaResultSet != null) {
      return odaResultSet.fetch();
    }
    if (datasetCache != null) {
      return datasetCache.fetch(stopSign);
    }
 else     if (customDataSet != null) {
      return customDataSet.fetch();
    }
 else     if (resultIterator != null) {
      if (!riStarted)       riStarted=true;
 else       this.resultIterator.next();
      return this.resultIterator.getCurrentResult();
    }
 else     if (roReader != null) {
      return roReader.fetch();
    }
 else     if (populator != null) {
      return populator.next();
    }
 else {
      return resultSetCache.fetch();
    }
  }
 catch (  IllegalArgumentException e) {
    throw new DataException(e.getLocalizedMessage());
  }
}
Program: 74551
Project: 74551
Buggy source:
/** 
 * Notice the return value of this function is IResultObject. The null value indicates the cursor exceeds the end of result set.
 * @return next result data
 * @throws DataException
 */
public IResultObject next() throws DataException {
  if (currIndex >= maxRows)   return null;
  IResultObject odaObject=null;
  while (true) {
    odaObject=odiAdpater.fetch();
    if (odaObject == null) {
      break;
    }
 else     if (processFetchEvent(odaObject,currIndex) == true) {
      if (this.distinctValueFlag == true && isDuplicatedObject(odaObject))       continue;
      currIndex++;
      break;
    }
  }
  return odaObject;
}

Fixed version (ground truth):
/** 
 * Notice the return value of this function is IResultObject. The null value indicates the cursor exceeds the end of result set.
 * @param stopSign
 * @return next result data
 * @throws DataException
 */
public IResultObject next(StopSign stopSign) throws DataException {
  if (currIndex >= maxRows)   return null;
  IResultObject odaObject=null;
  while (true) {
    odaObject=odiAdpater.fetch(stopSign);
    if (odaObject == null) {
      break;
    }
 else     if (processFetchEvent(odaObject,currIndex) == true) {
      if (this.distinctValueFlag == true && isDuplicatedObject(odaObject))       continue;
      currIndex++;
      break;
    }
  }
  return odaObject;
}
Program: 74553
Project: 74553
Buggy source:
public IResultObject next() throws DataException {
  IResultObject result=null;
  if (startNewGroup) {
    currentGroup++;
    if (currentGroup > orderingInfo.getCount() - 1)     return null;
    rsCache.moveTo(orderingInfo.getStartIndex(currentGroup));
    startNewGroup=false;
  }
 else {
    rsCache.next();
  }
  result=rsCache.getCurrentResult();
  if (rsCache.getCurrentIndex() == orderingInfo.getEndIndex(currentGroup))   startNewGroup=true;
  return result;
}

Fixed version (ground truth):
public IResultObject next(StopSign stopSign) throws DataException {
  IResultObject result=null;
  if (startNewGroup) {
    currentGroup++;
    if (currentGroup > orderingInfo.getCount() - 1)     return null;
    rsCache.moveTo(orderingInfo.getStartIndex(currentGroup));
    startNewGroup=false;
  }
 else {
    rsCache.next();
  }
  result=rsCache.getCurrentResult();
  if (rsCache.getCurrentIndex() == orderingInfo.getEndIndex(currentGroup))   startNewGroup=true;
  return result;
}
Program: 74554
Project: 74554
Buggy source:
/** 
 * A util method for sub class
 * @param resultObject
 * @param rs
 * @param dataCountOfUnit
 * @param stopSign
 * @throws DataException , fetch data exception
 * @throws IOException , file writer exception
 * @return how much data is exported
 */
protected int innerExportRestData(IResultObject resultObject,IRowResultSet rs,int dataCountOfUnit,StopSign stopSign) throws DataException, IOException {
  int columnCount=rs.getMetaData().getFieldCount();
  IResultObject[] rowDatas=new IResultObject[dataCountOfUnit];
  rowDatas[0]=resultObject;
  int currDataCount=1;
  int dataIndex=1;
  IResultObject odaObject=null;
  while ((odaObject=rs.next()) != null && !stopSign.isStopped()) {
    Object[] ob=new Object[columnCount];
    for (int i=0; i < columnCount; i++)     ob[i]=odaObject.getFieldValue(i + 1);
    IResultObject rowData=resultObjectUtil.newResultObject(ob);
    if (currDataCount % dataCountOfUnit == 0) {
      int indexOfUnit=currDataCount / dataCountOfUnit - 1;
      if (indexOfUnit >= 0)       outputResultObjects(rowDatas,indexOfUnit + 1,stopSign);
      dataIndex=0;
    }
    rowDatas[dataIndex++]=rowData;
    currDataCount++;
  }
  IResultObject[] rowDatas2=rowDatas;
  int indexOfUnit=currDataCount / dataCountOfUnit - 1;
  if (currDataCount % dataCountOfUnit != 0) {
    indexOfUnit++;
    int length=currDataCount % dataCountOfUnit;
    rowDatas2=new IResultObject[length];
    System.arraycopy(rowDatas,0,rowDatas2,0,length);
  }
  outputResultObjects(rowDatas2,indexOfUnit + 1,stopSign);
  return currDataCount;
}

Fixed version (ground truth):
/** 
 * A util method for sub class
 * @param resultObject
 * @param rs
 * @param dataCountOfUnit
 * @param stopSign
 * @throws DataException , fetch data exception
 * @throws IOException , file writer exception
 * @return how much data is exported
 */
protected int innerExportRestData(IResultObject resultObject,IRowResultSet rs,int dataCountOfUnit,StopSign stopSign) throws DataException, IOException {
  int columnCount=rs.getMetaData().getFieldCount();
  IResultObject[] rowDatas=new IResultObject[dataCountOfUnit];
  rowDatas[0]=resultObject;
  int currDataCount=1;
  int dataIndex=1;
  IResultObject odaObject=null;
  while ((odaObject=rs.next(stopSign)) != null && !stopSign.isStopped()) {
    Object[] ob=new Object[columnCount];
    for (int i=0; i < columnCount; i++)     ob[i]=odaObject.getFieldValue(i + 1);
    IResultObject rowData=resultObjectUtil.newResultObject(ob);
    if (currDataCount % dataCountOfUnit == 0) {
      int indexOfUnit=currDataCount / dataCountOfUnit - 1;
      if (indexOfUnit >= 0)       outputResultObjects(rowDatas,indexOfUnit + 1,stopSign);
      dataIndex=0;
    }
    rowDatas[dataIndex++]=rowData;
    currDataCount++;
  }
  IResultObject[] rowDatas2=rowDatas;
  int indexOfUnit=currDataCount / dataCountOfUnit - 1;
  if (currDataCount % dataCountOfUnit != 0) {
    indexOfUnit++;
    int length=currDataCount % dataCountOfUnit;
    rowDatas2=new IResultObject[length];
    System.arraycopy(rowDatas,0,rowDatas2,0,length);
  }
  outputResultObjects(rowDatas2,indexOfUnit + 1,stopSign);
  return currDataCount;
}
Program: 74555
Project: 74555
Buggy source:
protected int innerExportRestData(IResultObject resultObject,IRowResultSet rs,int dataCountOfUnit,StopSign stopSign) throws DataException, IOException {
  addNewRow(resultObject);
  int columnCount=rs.getMetaData().getFieldCount();
  int currDataCount=1;
  IResultObject odaObject=null;
  while ((odaObject=rs.next()) != null) {
    if (stopSign.isStopped())     return 0;
    Object[] ob=new Object[columnCount];
    for (int i=0; i < columnCount; i++)     ob[i]=odaObject.getFieldValue(i + 1);
    IResultObject rowData=resultObjectUtil.newResultObject(ob);
    addNewRow(rowData);
    currDataCount++;
  }
  processLastUnit(stopSign);
  return currDataCount;
}

Fixed version (ground truth):
protected int innerExportRestData(IResultObject resultObject,IRowResultSet rs,int dataCountOfUnit,StopSign stopSign) throws DataException, IOException {
  addNewRow(resultObject);
  int columnCount=rs.getMetaData().getFieldCount();
  int currDataCount=1;
  IResultObject odaObject=null;
  while ((odaObject=rs.next(stopSign)) != null) {
    if (stopSign.isStopped())     return 0;
    Object[] ob=new Object[columnCount];
    for (int i=0; i < columnCount; i++)     ob[i]=odaObject.getFieldValue(i + 1);
    IResultObject rowData=resultObjectUtil.newResultObject(ob);
    addNewRow(rowData);
    currDataCount++;
  }
  processLastUnit(stopSign);
  return currDataCount;
}
Program: 74556
Project: 74556
Buggy source:
/** 
 * @param dataSetHandle
 * @param rsMeta
 * @return
 * @throws BirtException
 */
private boolean needsSetCachedMetaData(DataSetHandle dataSetHandle,IResultMetaData rsMeta) throws BirtException {
  if (dataSetHandle.getCachedMetaDataHandle() == null || rsMeta == null || rsMeta.getColumnCount() == 0)   return true;
  List list=new ArrayList();
  for (Iterator iter=dataSetHandle.getCachedMetaDataHandle().getResultSet().iterator(); iter.hasNext(); ) {
    list.add(iter.next());
  }
  if (list.size() != rsMeta.getColumnCount())   return true;
  for (int i=1; i <= rsMeta.getColumnCount(); i++) {
    ResultSetColumnHandle handle=(ResultSetColumnHandle)list.get(i - 1);
    if (handle.getColumnName() == null || !handle.getColumnName().equals(getColumnName(rsMeta,i)) || !handle.getDataType().equals(toModelDataType(rsMeta.getColumnType(i))))     return true;
  }
  return false;
}

Fixed version (ground truth):
/** 
 * @param dataSetHandle
 * @param rsMeta
 * @return
 * @throws BirtException
 */
private boolean needsSetCachedMetaData(DataSetHandle dataSetHandle,IResultMetaData rsMeta) throws BirtException {
  if (dataSetHandle.getCachedMetaDataHandle() == null || rsMeta == null || rsMeta.getColumnCount() == 0)   return true;
  List list=new ArrayList();
  for (Iterator iter=dataSetHandle.getCachedMetaDataHandle().getResultSet().iterator(); iter.hasNext(); ) {
    list.add(iter.next());
  }
  if (list.size() != rsMeta.getColumnCount())   return true;
  for (int i=1; i <= rsMeta.getColumnCount(); i++) {
    ResultSetColumnHandle handle=(ResultSetColumnHandle)list.get(i - 1);
    if (handle.getColumnName() == null || !handle.getColumnName().equals(getColumnName(rsMeta,i)) || !handle.getDataType().equals(DataAdapterUtil.adapterToModelDataType(rsMeta.getColumnType(i))))     return true;
  }
  return false;
}
Program: 74557
Project: 74557
Buggy source:
/** 
 * @param meta
 * @throws BirtException 
 */
private void addResultSetColumn(DataSetHandle dataSetHandle,IResultMetaData meta) throws BirtException {
  if (meta == null || !(dataSetHandle instanceof OdaDataSetHandle))   return;
  List columnList=new ArrayList();
  HashSet orgColumnNameSet=new HashSet();
  HashSet uniqueColumnNameSet=new HashSet();
  for (int i=1; i <= meta.getColumnCount(); i++) {
    OdaResultSetColumn rsColumn=new OdaResultSetColumn();
    String uniqueName;
    if (!meta.isComputedColumn(i)) {
      uniqueName=MetaDataPopulator.getUniqueName(orgColumnNameSet,uniqueColumnNameSet,meta.getColumnName(i),i - 1);
      rsColumn.setColumnName(uniqueName);
      rsColumn.setDataType(toModelDataType(meta.getColumnType(i)));
      rsColumn.setNativeName(meta.getColumnName(i));
      rsColumn.setPosition(new Integer(i));
      columnList.add(rsColumn);
      uniqueColumnNameSet.add(uniqueName);
    }
  }
  CompatibilityUtil.addResultSetColumn(dataSetHandle,columnList);
}

Fixed version (ground truth):
/** 
 * @param meta
 * @throws BirtException 
 */
private void addResultSetColumn(DataSetHandle dataSetHandle,IResultMetaData meta) throws BirtException {
  if (meta == null || !(dataSetHandle instanceof OdaDataSetHandle))   return;
  List columnList=new ArrayList();
  HashSet orgColumnNameSet=new HashSet();
  HashSet uniqueColumnNameSet=new HashSet();
  for (int i=1; i <= meta.getColumnCount(); i++) {
    OdaResultSetColumn rsColumn=new OdaResultSetColumn();
    String uniqueName;
    if (!meta.isComputedColumn(i)) {
      uniqueName=MetaDataPopulator.getUniqueName(orgColumnNameSet,uniqueColumnNameSet,meta.getColumnName(i),i - 1);
      rsColumn.setColumnName(uniqueName);
      rsColumn.setDataType(DataAdapterUtil.adapterToModelDataType(meta.getColumnType(i)));
      rsColumn.setNativeName(meta.getColumnName(i));
      rsColumn.setPosition(new Integer(i));
      columnList.add(rsColumn);
      uniqueColumnNameSet.add(uniqueName);
    }
  }
  CompatibilityUtil.addResultSetColumn(dataSetHandle,columnList);
}
Program: 74558
Project: 74558
Buggy source:
/** 
 * @param dataSetHandle
 * @return
 * @throws BirtException
 */
IResultMetaData refreshMetaData(DataSetHandle dataSetHandle,boolean holdEvent) throws BirtException {
  IResultMetaData rsMeta=null;
  BirtException e=null;
  try {
    rsMeta=this.getDataSetMetaData(dataSetHandle,false);
  }
 catch (  BirtException e1) {
    e=e1;
  }
  if (needsSetCachedMetaData(dataSetHandle,rsMeta)) {
    List columnList=new ArrayList();
    if (rsMeta != null && rsMeta.getColumnCount() != 0) {
      for (int i=1; i <= rsMeta.getColumnCount(); i++) {
        ResultSetColumn rsc=StructureFactory.createResultSetColumn();
        rsc.setColumnName(getColumnName(rsMeta,i));
        rsc.setDataType(toModelDataType(rsMeta.getColumnType(i)));
        rsc.setPosition(new Integer(i));
        columnList.add(rsc);
      }
    }
    if (holdEvent || !dataSetHandle.canEdit()) {
      CompatibilityUtil.updateResultSetinCachedMetaData(dataSetHandle,columnList);
    }
 else {
      dataSetHandle.setCachedMetaData(StructureFactory.createCachedMetaData());
      for (int i=0; i < columnList.size(); i++) {
        dataSetHandle.getCachedMetaDataHandle().getResultSet().addItem((ResultSetColumn)columnList.get(i));
      }
    }
  }
  if (e != null)   throw e;
  return rsMeta;
}

Fixed version (ground truth):
/** 
 * @param dataSetHandle
 * @return
 * @throws BirtException
 */
IResultMetaData refreshMetaData(DataSetHandle dataSetHandle,boolean holdEvent) throws BirtException {
  IResultMetaData rsMeta=null;
  BirtException e=null;
  try {
    rsMeta=this.getDataSetMetaData(dataSetHandle,false);
  }
 catch (  BirtException e1) {
    e=e1;
  }
  if (needsSetCachedMetaData(dataSetHandle,rsMeta)) {
    List columnList=new ArrayList();
    if (rsMeta != null && rsMeta.getColumnCount() != 0) {
      for (int i=1; i <= rsMeta.getColumnCount(); i++) {
        ResultSetColumn rsc=StructureFactory.createResultSetColumn();
        rsc.setColumnName(getColumnName(rsMeta,i));
        rsc.setDataType(DataAdapterUtil.adapterToModelDataType(rsMeta.getColumnType(i)));
        rsc.setPosition(new Integer(i));
        columnList.add(rsc);
      }
    }
    if (holdEvent || !dataSetHandle.canEdit()) {
      CompatibilityUtil.updateResultSetinCachedMetaData(dataSetHandle,columnList);
    }
 else {
      dataSetHandle.setCachedMetaData(StructureFactory.createCachedMetaData());
      for (int i=0; i < columnList.size(); i++) {
        dataSetHandle.getCachedMetaDataHandle().getResultSet().addItem((ResultSetColumn)columnList.get(i));
      }
    }
  }
  if (e != null)   throw e;
  return rsMeta;
}
Program: 74560
Project: 74560
Buggy source:
public IPreparedCubeQuery prepare(ICubeQueryDefinition query,Map appContext) throws BirtException {
  if (stopSign != null)   stopSign.start();
  if (this.cubeHandleMap.get(query.getName()) != null) {
    this.materializeCube((CubeHandle)this.cubeHandleMap.get(query.getName()),appContext,stopSign);
    this.cubeHandleMap.remove(query.getName());
  }
  if (this.sessionContext.getDataEngineContext().getMode() == DataEngineContext.DIRECT_PRESENTATION) {
    int size=0;
    if (appContext != null) {
      size=populateFetchLimitSize(appContext.get(DataEngine.CUBECURSOR_FETCH_LIMIT_ON_LEVEL));
      if (size >= 0) {
        query.getFilters().addAll(fetchFilterList(query.getEdge(ICubeQueryDefinition.COLUMN_EDGE),size));
        query.getFilters().addAll(fetchFilterList(query.getEdge(ICubeQueryDefinition.ROW_EDGE),size));
      }
    }
  }
  return this.dataEngine.prepare(query,appContext);
}

Fixed version (ground truth):
public IPreparedCubeQuery prepare(ICubeQueryDefinition query,Map appContext) throws BirtException {
  if (stopSign != null)   stopSign.start();
  if (this.cubeHandleMap.get(query.getName()) != null) {
    this.materializeCube((CubeHandle)this.cubeHandleMap.get(query.getName()),appContext,stopSign);
    this.cubeHandleMap.remove(query.getName());
  }
  ICubeQueryDefinition cubeQueryDefn=new CubeQueryDefinitionAdapter(query);
  if (this.sessionContext.getDataEngineContext().getMode() == DataEngineContext.DIRECT_PRESENTATION) {
    int size=0;
    if (appContext != null) {
      size=populateFetchLimitSize(appContext.get(DataEngine.CUBECURSOR_FETCH_LIMIT_ON_LEVEL));
      if (size > 0) {
        cubeQueryDefn.getFilters().addAll(fetchFilterList(cubeQueryDefn.getEdge(ICubeQueryDefinition.COLUMN_EDGE),size));
        cubeQueryDefn.getFilters().addAll(fetchFilterList(cubeQueryDefn.getEdge(ICubeQueryDefinition.ROW_EDGE),size));
      }
    }
  }
  return this.dataEngine.prepare(cubeQueryDefn,appContext);
}
Program: 74561
Project: 74561
Buggy source:
public IPreparedCubeQuery prepare(ICubeQueryDefinition query,Map appContext) throws BirtException {
  stopSign.start();
  if (this.cubeHandleMap.get(query.getName()) != null) {
    this.materializeCube((CubeHandle)this.cubeHandleMap.get(query.getName()),appContext,stopSign);
    this.cubeHandleMap.remove(query.getName());
  }
  if (this.sessionContext.getDataEngineContext().getMode() == DataEngineContext.DIRECT_PRESENTATION) {
    int size=0;
    if (appContext != null) {
      size=populateFetchLimitSize(appContext.get(DataEngine.CUBECURSOR_FETCH_LIMIT_ON_LEVEL));
      if (size >= 0) {
        query.getFilters().addAll(fetchFilterList(query.getEdge(ICubeQueryDefinition.COLUMN_EDGE),size));
        query.getFilters().addAll(fetchFilterList(query.getEdge(ICubeQueryDefinition.ROW_EDGE),size));
      }
    }
  }
  return this.dataEngine.prepare(query,appContext);
}

Fixed version (ground truth):
public IPreparedCubeQuery prepare(ICubeQueryDefinition query,Map appContext) throws BirtException {
  if (stopSign != null)   stopSign.start();
  if (this.cubeHandleMap.get(query.getName()) != null) {
    this.materializeCube((CubeHandle)this.cubeHandleMap.get(query.getName()),appContext,stopSign);
    this.cubeHandleMap.remove(query.getName());
  }
  if (this.sessionContext.getDataEngineContext().getMode() == DataEngineContext.DIRECT_PRESENTATION) {
    int size=0;
    if (appContext != null) {
      size=populateFetchLimitSize(appContext.get(DataEngine.CUBECURSOR_FETCH_LIMIT_ON_LEVEL));
      if (size >= 0) {
        query.getFilters().addAll(fetchFilterList(query.getEdge(ICubeQueryDefinition.COLUMN_EDGE),size));
        query.getFilters().addAll(fetchFilterList(query.getEdge(ICubeQueryDefinition.ROW_EDGE),size));
      }
    }
  }
  return this.dataEngine.prepare(query,appContext);
}
Program: 74562
Project: 74562
Buggy source:
/** 
 * @param cubeHandle
 * @param appContext
 * @param stopSign
 * @throws BirtException
 */
private void materializeCube(CubeHandle cubeHandle,Map appContext,StopSign stopSign) throws BirtException {
  int mode=this.sessionContext.getDataEngineContext().getMode();
  try {
    CubeMaterializer cubeMaterializer=null;
    if (appContext == null)     appContext=sessionContext.getAppContext();
    if (mode == DataEngineContext.DIRECT_PRESENTATION) {
      int size=0;
      if (appContext != null) {
        Integer value=DataTypeUtil.toInteger(appContext.get(DataEngine.IN_MEMORY_CUBE_SIZE));
        if (value != null && value.intValue() > 0) {
          size=value.intValue();
        }
      }
      cubeMaterializer=createCubeMaterializer(cubeHandle,size);
      createCube((TabularCubeHandle)cubeHandle,cubeMaterializer,appContext,stopSign);
      cubeMaterializer.close();
    }
 else     if (mode == DataEngineContext.MODE_GENERATION) {
      cubeMaterializer=createCubeMaterializer(cubeHandle,0);
      createCube((TabularCubeHandle)cubeHandle,cubeMaterializer,appContext,stopSign);
      cubeMaterializer.saveCubeToReportDocument(cubeHandle.getQualifiedName(),this.sessionContext.getDocumentWriter(),null);
      cubeMaterializer.close();
    }
  }
 catch (  Exception e) {
    throw new DataException(e.getLocalizedMessage());
  }
}

Fixed version (ground truth):
/** 
 * @param cubeHandle
 * @param appContext
 * @param stopSign
 * @throws BirtException
 */
private void materializeCube(CubeHandle cubeHandle,Map appContext,StopSign stopSign) throws BirtException {
  if (stopSign == null)   stopSign=new StopSign();
  int mode=this.sessionContext.getDataEngineContext().getMode();
  try {
    CubeMaterializer cubeMaterializer=null;
    if (appContext == null)     appContext=sessionContext.getAppContext();
    if (mode == DataEngineContext.DIRECT_PRESENTATION) {
      int size=0;
      if (appContext != null) {
        Integer value=DataTypeUtil.toInteger(appContext.get(DataEngine.IN_MEMORY_CUBE_SIZE));
        if (value != null && value.intValue() > 0) {
          size=value.intValue();
        }
      }
      cubeMaterializer=createCubeMaterializer(cubeHandle,size);
      createCube((TabularCubeHandle)cubeHandle,cubeMaterializer,appContext,stopSign);
      cubeMaterializer.close();
    }
 else     if (mode == DataEngineContext.MODE_GENERATION) {
      cubeMaterializer=createCubeMaterializer(cubeHandle,0);
      createCube((TabularCubeHandle)cubeHandle,cubeMaterializer,appContext,stopSign);
      cubeMaterializer.saveCubeToReportDocument(cubeHandle.getQualifiedName(),this.sessionContext.getDocumentWriter(),null);
      cubeMaterializer.close();
    }
  }
 catch (  Exception e) {
    throw new DataException(e.getLocalizedMessage());
  }
}
Program: 74563
Project: 74563
Buggy source:
/** 
 * Inits default toc style value.
 */
private void initDefaultTOCStyle(){
  defaultTOCStyleList=new ArrayList();
  URL url=new DefaultResourceLocator().findResource(null,TOC_DEFAULT_VALUE,IResourceLocator.OTHERS);
  if (url == null)   return;
  ReportDesign tocDesign=null;
  try {
    DesignSession session=new DesignSession(ULocale.ENGLISH);
    tocDesign=session.openDesign(url,url.openStream());
    tocDesign.setReadOnly();
  }
 catch (  DesignFileException e) {
    return;
  }
catch (  IOException e) {
    return;
  }
  ContainerSlot slot=tocDesign.getSlot(IReportDesignModel.STYLE_SLOT);
  Iterator iterator=slot.iterator();
  while (iterator.hasNext()) {
    DesignElement tmpStyle=(DesignElement)iterator.next();
    StyleHandle styleHandle=(StyleHandle)tmpStyle.getHandle(tocDesign);
    defaultTOCStyleList.add(styleHandle);
  }
}

Fixed version (ground truth):
/** 
 * Inits default toc style value.
 */
private void initDefaultTOCStyle(){
  defaultTOCStyleList=new ArrayList();
  URL url=new DefaultResourceLocator().findResource(null,TOC_DEFAULT_VALUE,IResourceLocator.OTHERS);
  if (url == null)   return;
  ReportDesign tocDesign=null;
  try {
    DesignSession session=new DesignSession(locale);
    tocDesign=session.openDesign(url,url.openStream());
    tocDesign.setReadOnly();
  }
 catch (  DesignFileException e) {
    return;
  }
catch (  IOException e) {
    return;
  }
  ContainerSlot slot=tocDesign.getSlot(IReportDesignModel.STYLE_SLOT);
  Iterator iterator=slot.iterator();
  while (iterator.hasNext()) {
    DesignElement tmpStyle=(DesignElement)iterator.next();
    StyleHandle styleHandle=(StyleHandle)tmpStyle.getHandle(tocDesign);
    defaultTOCStyleList.add(styleHandle);
  }
}
Program: 74567
Project: 74567
Buggy source:
/** 
 * @throws OLAPException
 * @throws BirtException 
 */
public void testCursorOnCountry() throws OLAPException, BirtException {
  ICubeQueryDefinition cqd=this.creator.createQueryDefinition();
  IBinding rowGrandTotal=new Binding("String_Node_Str");
  rowGrandTotal.setAggrFunction(IBuildInAggregation.TOTAL_SUM_FUNC);
  rowGrandTotal.setExpression(new ScriptExpression("String_Node_Str"));
  rowGrandTotal.addAggregateOn("String_Node_Str");
  rowGrandTotal.addAggregateOn("String_Node_Str");
  rowGrandTotal.addAggregateOn("String_Node_Str");
  cqd.addBinding(rowGrandTotal);
  BirtCubeView cubeView=new BirtCubeView(new CubeQueryExecutor(cqd,de.getSession(),this.scope,de.getContext()));
  CubeCursor dataCursor=cubeView.getCubeCursor();
  List columnEdgeBindingNames=new ArrayList();
  columnEdgeBindingNames.add("String_Node_Str");
  columnEdgeBindingNames.add("String_Node_Str");
  columnEdgeBindingNames.add("String_Node_Str");
  columnEdgeBindingNames.add("String_Node_Str");
  List rowEdgeBindingNames=new ArrayList();
  rowEdgeBindingNames.add("String_Node_Str");
  rowEdgeBindingNames.add("String_Node_Str");
  List measureBindingNames=new ArrayList();
  measureBindingNames.add("String_Node_Str");
  List grandBindingNames=new ArrayList();
  grandBindingNames.add("String_Node_Str");
  try {
    testOut.print(creator.printCubeAlongEdge(dataCursor,columnEdgeBindingNames,rowEdgeBindingNames,measureBindingNames,null,null,null,grandBindingNames));
    this.checkOutputFile();
  }
 catch (  Exception e) {
    fail("String_Node_Str");
  }
}

Fixed version (ground truth):
/** 
 * @throws OLAPException
 * @throws BirtException 
 */
public void testCursorOnCountry() throws OLAPException, BirtException {
  ICubeQueryDefinition cqd=this.creator.createQueryDefinition();
  IBinding rowGrandTotal=new Binding("String_Node_Str");
  rowGrandTotal.setAggrFunction(IBuildInAggregation.TOTAL_SUM_FUNC);
  rowGrandTotal.setExpression(new ScriptExpression("String_Node_Str"));
  rowGrandTotal.addAggregateOn("String_Node_Str");
  rowGrandTotal.addAggregateOn("String_Node_Str");
  rowGrandTotal.addAggregateOn("String_Node_Str");
  cqd.addBinding(rowGrandTotal);
  BirtCubeView cubeView=new BirtCubeView(new CubeQueryExecutor(cqd,de.getSession(),this.scope,de.getContext()));
  CubeCursor dataCursor=cubeView.getCubeCursor(new StopSign());
  List columnEdgeBindingNames=new ArrayList();
  columnEdgeBindingNames.add("String_Node_Str");
  columnEdgeBindingNames.add("String_Node_Str");
  columnEdgeBindingNames.add("String_Node_Str");
  columnEdgeBindingNames.add("String_Node_Str");
  List rowEdgeBindingNames=new ArrayList();
  rowEdgeBindingNames.add("String_Node_Str");
  rowEdgeBindingNames.add("String_Node_Str");
  List measureBindingNames=new ArrayList();
  measureBindingNames.add("String_Node_Str");
  List grandBindingNames=new ArrayList();
  grandBindingNames.add("String_Node_Str");
  try {
    testOut.print(creator.printCubeAlongEdge(dataCursor,columnEdgeBindingNames,rowEdgeBindingNames,measureBindingNames,null,null,null,grandBindingNames));
    this.checkOutputFile();
  }
 catch (  Exception e) {
    fail("String_Node_Str");
  }
}
Program: 74570
Project: 74570
Buggy source:
/** 
 * without column edge
 * @throws OLAPException
 * @throws BirtException 
 */
public void testCursorModel3() throws OLAPException, BirtException {
  ICubeQueryDefinition cqd=new CubeQueryDefinition(CubeUtility.cubeName);
  cqd.createMeasure("String_Node_Str");
  IEdgeDefinition rowEdge=cqd.createEdge(ICubeQueryDefinition.ROW_EDGE);
  IDimensionDefinition dim1=rowEdge.createDimension("String_Node_Str");
  IHierarchyDefinition hier1=dim1.createHierarchy("String_Node_Str");
  hier1.createLevel("String_Node_Str");
  IDimensionDefinition dim2=rowEdge.createDimension("String_Node_Str");
  IHierarchyDefinition hier2=dim2.createHierarchy("String_Node_Str");
  hier2.createLevel("String_Node_Str");
  BirtCubeView cubeView=new BirtCubeView(new CubeQueryExecutor(cqd,de.getSession(),this.scope,de.getContext()));
  CubeCursor dataCursor=cubeView.getCubeCursor();
  EdgeCursor rowCursor=cubeView.getRowEdgeView().getEdgeCursor();
  DimensionCursor productCursor1=(DimensionCursor)rowCursor.getDimensionCursor().get(0);
  DimensionCursor productCursor2=(DimensionCursor)rowCursor.getDimensionCursor().get(1);
  testOut.print(creator.printCubeAlongDimension(dataCursor,null,null,null,null,productCursor1,productCursor2));
  try {
    this.checkOutputFile();
  }
 catch (  Exception e) {
    fail("String_Node_Str");
  }
}

Fixed version (ground truth):
/** 
 * without column edge
 * @throws OLAPException
 * @throws BirtException 
 */
public void testCursorModel3() throws OLAPException, BirtException {
  ICubeQueryDefinition cqd=new CubeQueryDefinition(CubeUtility.cubeName);
  cqd.createMeasure("String_Node_Str");
  IEdgeDefinition rowEdge=cqd.createEdge(ICubeQueryDefinition.ROW_EDGE);
  IDimensionDefinition dim1=rowEdge.createDimension("String_Node_Str");
  IHierarchyDefinition hier1=dim1.createHierarchy("String_Node_Str");
  hier1.createLevel("String_Node_Str");
  IDimensionDefinition dim2=rowEdge.createDimension("String_Node_Str");
  IHierarchyDefinition hier2=dim2.createHierarchy("String_Node_Str");
  hier2.createLevel("String_Node_Str");
  BirtCubeView cubeView=new BirtCubeView(new CubeQueryExecutor(cqd,de.getSession(),this.scope,de.getContext()));
  CubeCursor dataCursor=cubeView.getCubeCursor(new StopSign());
  EdgeCursor rowCursor=cubeView.getRowEdgeView().getEdgeCursor();
  DimensionCursor productCursor1=(DimensionCursor)rowCursor.getDimensionCursor().get(0);
  DimensionCursor productCursor2=(DimensionCursor)rowCursor.getDimensionCursor().get(1);
  testOut.print(creator.printCubeAlongDimension(dataCursor,null,null,null,null,productCursor1,productCursor2));
  try {
    this.checkOutputFile();
  }
 catch (  Exception e) {
    fail("String_Node_Str");
  }
}