nus-yam/ex-repair huggingface dataset:
Program: 78540
Project: 78540
Buggy source:
public void testCopyPasteTheme() throws Exception {
  openLibrary(LibC);
  ThemeHandle defaulttheme=libraryHandle.findTheme("String_Node_Str");
  ThemeHandle theme1=libraryHandle.findTheme("String_Node_Str");
  assertNotNull(defaulttheme);
  assertNotNull(theme1);
  ThemeHandle defaultcopy=((Theme)defaulttheme.copy()).handle(libraryHandle.getModule());
  ThemeHandle theme1copy=((Theme)theme1.copy()).handle(libraryHandle.getModule());
  try {
    libraryHandle.getThemes().add(defaultcopy);
    fail();
  }
 catch (  NameException e) {
    assertNotNull(e);
  }
  defaultcopy.setName("String_Node_Str");
  theme1copy.setName("String_Node_Str");
  libraryHandle.getThemes().add(defaultcopy);
  libraryHandle.getThemes().add(theme1copy);
  assertEquals("String_Node_Str",libraryHandle.getThemes().get(2).getName());
  assertEquals("String_Node_Str",libraryHandle.getThemes().get(3).getName());
  openLibrary(LibB);
  libraryHandle.getThemes().add(defaultcopy);
  libraryHandle.getThemes().add(theme1copy);
  assertEquals("String_Node_Str",libraryHandle.getThemes().get(2).getName());
  assertEquals("String_Node_Str",libraryHandle.getThemes().get(3).getName());
}

Fixed version (ground truth):
public void testCopyPasteTheme() throws Exception {
  openLibrary(LibC);
  ThemeHandle defaulttheme=libraryHandle.findTheme("String_Node_Str");
  ThemeHandle theme1=libraryHandle.findTheme("String_Node_Str");
  assertNotNull(defaulttheme);
  assertNotNull(theme1);
  ThemeHandle defaultcopy=((Theme)defaulttheme.copy()).handle(libraryHandle.getModule());
  ThemeHandle defaultcopy1=((Theme)defaulttheme.copy()).handle(libraryHandle.getModule());
  ThemeHandle theme1copy=((Theme)theme1.copy()).handle(libraryHandle.getModule());
  ThemeHandle theme1copy1=((Theme)theme1.copy()).handle(libraryHandle.getModule());
  try {
    libraryHandle.getThemes().add(defaultcopy);
    fail();
  }
 catch (  NameException e) {
    assertNotNull(e);
  }
  defaultcopy.setName("String_Node_Str");
  theme1copy.setName("String_Node_Str");
  libraryHandle.getThemes().add(defaultcopy);
  libraryHandle.getThemes().add(theme1copy);
  assertEquals("String_Node_Str",libraryHandle.getThemes().get(2).getName());
  assertEquals("String_Node_Str",libraryHandle.getThemes().get(3).getName());
  openLibrary(LibB);
  defaultcopy1.setName("String_Node_Str");
  theme1copy1.setName("String_Node_Str");
  libraryHandle.getThemes().add(defaultcopy1);
  libraryHandle.getThemes().add(theme1copy1);
  assertEquals("String_Node_Str",libraryHandle.getThemes().get(2).getName());
  assertEquals("String_Node_Str",libraryHandle.getThemes().get(3).getName());
}
Program: 78541
Project: 78541
Buggy source:
public void setCurrentEditObject(Object obj){
  this.currentEditObject=obj;
  if (contextItem != null && !contextItem.isDisposed()) {
    contextItem.removeAll();
  }
}

Fixed version (ground truth):
public void setCurrentEditObject(Object obj){
  this.currentEditObject=obj;
  removeTreeItem();
}
Program: 78542
Project: 78542
Buggy source:
/** 
 * Creates context objects tree. Context ojects tree is used in JS editor palette, which displays current object method's arguments.
 */
public void createContextObjects(String methodName){
  if (contextItem != null && !contextItem.isDisposed() && currentEditObject != null && methodName != null) {
    contextItem.removeAll();
    DesignElementHandle handle=(DesignElementHandle)currentEditObject;
    Map argMap=DEUtil.getDesignElementMethodArguments(handle,methodName);
    for (Iterator iter=argMap.keySet().iterator(); iter.hasNext(); ) {
      String argName=(String)iter.next();
      createSubTreeItem(contextItem,argName,IMAGE_METHOD,argName,"String_Node_Str",true);
    }
  }
}

Fixed version (ground truth):
/** 
 * Creates context objects tree. Context ojects tree is used in JS editor palette, which displays current object method's arguments.
 */
public void createContextObjects(String methodName){
  if (contextItem != null && !contextItem.isDisposed() && currentEditObject != null && methodName != null) {
    removeTreeItem();
    DesignElementHandle handle=(DesignElementHandle)currentEditObject;
    Map argMap=DEUtil.getDesignElementMethodArguments(handle,methodName);
    for (Iterator iter=argMap.keySet().iterator(); iter.hasNext(); ) {
      String argName=(String)iter.next();
      createSubTreeItem(contextItem,argName,IMAGE_METHOD,argName,"String_Node_Str",true);
    }
  }
}
Program: 78543
Project: 78543
Buggy source:
/** 
 * remove the tree item's direct child treeItem, cause since 3.1, TreeItem.removeAll is supported.But in 3.0,this method is not supported.
 * @param treeItem
 */
private void removeTreeItem(TreeItem treeItem){
  TreeItem[] items=treeItem.getItems();
  for (int i=0; i < items.length; i++) {
    if (items[i] != null && !items[i].isDisposed()) {
      items[i].dispose();
    }
  }
}

Fixed version (ground truth):
/** 
 * remove the tree item's direct child treeItem, cause since 3.1, TreeItem.removeAll is supported.But in 3.0,this method is not supported.
 * @param treeItem
 */
private void removeTreeItem(TreeItem treeItem){
  if (treeItem.isDisposed())   return;
  TreeItem[] items=treeItem.getItems();
  for (int i=0; i < items.length; i++) {
    if (items[i] != null && !items[i].isDisposed()) {
      items[i].dispose();
    }
  }
}
Program: 78544
Project: 78544
Buggy source:
public static boolean getForceReset(){
  return forceReset;
}

Fixed version (ground truth):
public boolean getForceReset(){
  return forceReset;
}
Program: 78545
Project: 78545
Buggy source:
public static int getRowCount(){
  return rowCount;
}

Fixed version (ground truth):
public int getRowCount(){
  return rowCount;
}
Program: 78546
Project: 78546
Buggy source:
public static int getPassLevel(){
  return passLevel;
}

Fixed version (ground truth):
public int getPassLevel(){
  return passLevel;
}
Program: 78547
Project: 78547
Buggy source:
public static void setRowCount(int i){
  rowCount=i;
}

Fixed version (ground truth):
public void setRowCount(int i){
  rowCount=i;
}
Program: 78548
Project: 78548
Buggy source:
public static void setForceReset(boolean b){
  forceReset=b;
}

Fixed version (ground truth):
public void setForceReset(boolean b){
  forceReset=b;
}
Program: 78549
Project: 78549
Buggy source:
public static void setPassLevel(int i){
  passLevel=i;
}

Fixed version (ground truth):
public void setPassLevel(int i){
  passLevel=i;
}
Program: 78550
Project: 78550
Buggy source:
/** 
 * @param value
 * @param N
 * @throws DataException
 */
private void populateValueListAndRowIdList(Object value,int N) throws DataException {
  for (int i=0; i < N; i++) {
    if (value == null)     value="String_Node_Str";
    if (valueList[i] == null) {
      valueList[i]=value;
      rowIdList[i]=firstPassRowNumberCounter;
      break;
    }
 else {
      Object result=this.doCompare(value,valueList[i]);
      try {
        if (DataTypeUtil.toBoolean(result).booleanValue() == true) {
          for (int j=N - 1; j > i; j--) {
            valueList[j]=valueList[j - 1];
            rowIdList[j]=rowIdList[j - 1];
          }
          valueList[i]=value;
          rowIdList[i]=firstPassRowNumberCounter;
          break;
        }
      }
 catch (      BirtException e) {
        throw DataException.wrap(e);
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * @param value
 * @param N
 * @throws DataException
 */
private void populateValueListAndRowIdList(Object value,int N) throws DataException {
}
Program: 78551
Project: 78551
Buggy source:
/** 
 * Evaluate the given value
 * @param value
 * @param n
 * @return
 * @throws DataException
 */
public boolean evaluate(Object value,Object n,boolean calculatePercent) throws DataException {
  if (FilterPassController.getForceReset()) {
    doReset();
    FilterPassController.setForceReset(false);
  }
  if (N == -1) {
    try {
      if (calculatePercent) {
        double temp=Double.valueOf(n.toString()).doubleValue() / 100;
        if (temp > 1 || temp < 0)         throw new DataException(ResourceConstants.INVALID_TOP_BOTTOM_PERCENT_ARGUMENT);
        N=(int)Math.round(temp * getRowCount());
      }
 else       N=Double.valueOf(n.toString()).intValue();
    }
 catch (    NumberFormatException e) {
    }
    if (N < 0)     throw new DataException(ResourceConstants.INVALID_TOP_BOTTOM_N_ARGUMENT);
  }
  if (getPassLevel() == FIRST_PASS) {
    return doFirstPass(value);
  }
 else   if (getPassLevel() == SECOND_PASS) {
    return doSecondPass();
  }
  return false;
}

Fixed version (ground truth):
/** 
 * Evaluate the given value
 * @param value
 * @param n
 * @return
 * @throws DataException
 */
public boolean evaluate(Context cx,Scriptable scope) throws DataException {
  if (filterPassController.getForceReset()) {
    doReset();
    filterPassController.setForceReset(false);
  }
  if (N == -1) {
    Object n_object=ScriptEvalUtil.evalExpr(n_expr,cx,scope,"String_Node_Str",0);
    double n_value=-1;
    try {
      n_value=DataTypeUtil.toDouble(n_object).doubleValue();
    }
 catch (    BirtException e) {
      throw new DataException(ResourceConstants.INVALID_TOP_BOTTOM_PERCENT_ARGUMENT,e);
    }
    if (n_percent) {
      if (n_value < 0 || n_value > 100)       throw new DataException(ResourceConstants.INVALID_TOP_BOTTOM_PERCENT_ARGUMENT);
      N=(int)Math.round(n_value / 100 * filterPassController.getRowCount());
    }
 else {
      if (n_value < 0)       throw new DataException(ResourceConstants.INVALID_TOP_BOTTOM_PERCENT_ARGUMENT);
      N=(int)n_value;
    }
  }
  Object value=ScriptEvalUtil.evalExpr(op_expr,cx,scope,"String_Node_Str",0);
  if (filterPassController.getPassLevel() == FilterPassController.FIRST_PASS) {
    return doFirstPass(value);
  }
 else   if (filterPassController.getPassLevel() == FilterPassController.SECOND_PASS) {
    return doSecondPass();
  }
  return false;
}
Program: 78554
Project: 78554
Buggy source:
/** 
 * Gets a handle to deal with the item's x (horizontal) position.
 * @return The item's x position.
 */
String getX();

Fixed version (ground truth):
/** 
 * Gets the item's x (horizontal) position.
 * @return The item's x position.
 */
String getX();
Program: 78555
Project: 78555
Buggy source:
/** 
 * Gets a handle to deal with the item's height.
 * @return a DimensionHandle for the item's height.
 */
String getHeight();

Fixed version (ground truth):
/** 
 * Gets the item's height.
 * @return the item's height.
 */
String getHeight();
Program: 78556
Project: 78556
Buggy source:
/** 
 * Sets the bookmark of the report item.
 * @param value the property value to be set.
 * @throws ScriptException if the property is locked.
 */
void setBookmark(String value) throws ScriptException ;

Fixed version (ground truth):
/** 
 * Sets the bookmark of the report item. The bookmark value is evaluated as an expression. If you want the bookmark to be the string "bookmark", you need to use setBookmark("\"bookmark\""); If bookmark is a JavaScript variable, use setBookmark("bookmark");
 * @param value the bookmark expression
 * @throws ScriptException if the property is locked.
 */
void setBookmark(String value) throws ScriptException ;
Program: 78557
Project: 78557
Buggy source:
/** 
 * Gets a handle to deal with the item's y (vertical) position.
 * @return The item's y position.
 */
String getY();

Fixed version (ground truth):
/** 
 * Gets the item's y (vertical) position.
 * @return The item's y position.
 */
String getY();
Program: 78558
Project: 78558
Buggy source:
/** 
 * Gets a handle to deal with the item's width.
 * @return a DimensionHandle for the item's width.
 */
String getWidth();

Fixed version (ground truth):
/** 
 * Gets a the item's width.
 * @return a the item's width.
 */
String getWidth();
Program: 78559
Project: 78559
Buggy source:
/** 
 * Returns the bookmark of the report item.
 * @return the book mark as a string
 */
String getBookmark();

Fixed version (ground truth):
/** 
 * Returns the bookmark of the report item. The bookmark value is evaluated as an expression.
 * @return the book mark as a string
 */
String getBookmark();
Program: 78560
Project: 78560
Buggy source:
/** 
 * Gets a handle to deal with the row's height.
 * @return a DimensionHandle for the row's height.
 */
String getHeight();

Fixed version (ground truth):
/** 
 * Gets a handle to deal with the row's height.
 * @return the row's height.
 */
String getHeight();
Program: 78561
Project: 78561
Buggy source:
/** 
 * Sets the bookmark of this row.
 * @param value the bookmark to set
 * @throws ScriptException if the property is locked.
 */
void setBookmark(String value) throws ScriptException ;

Fixed version (ground truth):
/** 
 * Sets the bookmark of the row. The bookmark value is evaluated as an expression. If you want the bookmark to be the string "bookmark", you need to use setBookmark("\"bookmark\""); If bookmark is a JavaScript variable, use setBookmark("bookmark");
 * @param value the bookmark expression
 * @throws ScriptException if the property is locked.
 */
void setBookmark(String value) throws ScriptException ;
Program: 78562
Project: 78562
Buggy source:
/** 
 * Returns the bookmark of this row.
 * @return the bookmark of this row
 */
String getBookmark();

Fixed version (ground truth):
/** 
 * Returns the bookmark of the row. The bookmark value is evaluated as an expression.
 * @return the book mark as a string
 */
String getBookmark();
Program: 78563
Project: 78563
Buggy source:
/** 
 * Handle the fetch event. Implementation should call methods on  the row object to set data of the current row being fetched.
 * @return true if current data row has been populated. false if the last call to fetch has returned the last data row, and no more data is available.   
 */
boolean fetch(IDataSetInstance dataSet,IUpdatableDataSetRow row);

Fixed version (ground truth):
/** 
 * Handle the fetch event. Implementation should call methods on the row object to set data of the current row being fetched.
 * @return true if current data row has been populated. false if the lastcall to fetch has returned the last data row, and no more data is available.
 */
boolean fetch(IDataSetInstance dataSet,IUpdatableDataSetRow row);
Program: 78564
Project: 78564
Buggy source:
/** 
 * Method for Script Data Set to return dynamically generated data set  metadata. This method is called  before the open event  is fired. If the data set implementation has dynamically generated metadata, it should call the addColumn method on the metaData object to add all its column definition, then return true. If the data set implementation uses the static metadata defined in the data set design , it should return false.
 */
boolean describe(IDataSetInstance dataSet,IScriptedDataSetMetaData metaData);

Fixed version (ground truth):
/** 
 * Method for Script Data Set to return dynamically generated data set metadata. This method is called before the open event is fired. If the data set implementation has dynamically generated metadata, it should call the addColumn method on the metaData object to add all its column definition, then return true. If the data set implementation uses the static metadata defined in the data set design , it should return false.
 */
boolean describe(IDataSetInstance dataSet,IScriptedDataSetMetaData metaData);
Program: 78565
Project: 78565
Buggy source:
/** 
 * @param hyperlink
 * @param bookmark
 * @param target
 * @return
 */
private PdfAction createPdfAction(String hyperlink,String bookmark,String target){
  if ("String_Node_Str".equalsIgnoreCase(target)) {
    return new PdfAction(hyperlink);
  }
 else {
    if (null == hyperlink) {
      return PdfAction.gotoLocalPage(bookmark,false);
    }
 else {
      return PdfAction.gotoRemotePage(hyperlink,bookmark,false,false);
    }
  }
}

Fixed version (ground truth):
/** 
 * create a PdfAction
 * @param hyperlink			
 * @param bookmark
 * @param target			if target equals "_blank", the target will be opened in a new window,else the target will be opened in the current window.
 * @return					the created PdfAction.
 */
private PdfAction createPdfAction(String hyperlink,String bookmark,String target){
  if ("String_Node_Str".equalsIgnoreCase(target)) {
    return new PdfAction(hyperlink);
  }
 else {
    if (null == hyperlink) {
      return PdfAction.gotoLocalPage(bookmark,false);
    }
 else {
      return PdfAction.gotoRemotePage(hyperlink,bookmark,false,false);
    }
  }
}
Program: 78566
Project: 78566
Buggy source:
private void loadResultSetMetaData() throws EngineException {
  IDocArchiveReader reader=reportDocReader.getArchive();
  try {
    ObjectInputStream ois=new ObjectInputStream(reader.getStream(AbstractDataEngine.DATA_META_STREAM));
    mapQueryIDToResultSetName=(HashMap)ois.readObject();
    ois.close();
  }
 catch (  IOException ioe) {
    executionContext.addException(new EngineException("String_Node_Str",ioe));
    logger.log(Level.SEVERE,ioe.getMessage(),ioe);
  }
catch (  ClassNotFoundException cnfe) {
    executionContext.addException(new EngineException("String_Node_Str",cnfe));
    logger.log(Level.SEVERE,cnfe.getMessage(),cnfe);
  }
}

Fixed version (ground truth):
private void loadResultSetMetaData() throws EngineException {
  IDocArchiveReader reader=reportDocReader.getArchive();
  try {
    DataInputStream dis=new DataInputStream(reader.getStream(AbstractDataEngine.DATA_META_STREAM));
    mapQueryIDToResultSetName=new HashMap();
    int size=IOUtil.readInt(dis);
    for (int i=0; i < size; i++) {
      String queryId=IOUtil.readString(dis);
      LinkedList ridList=new LinkedList();
      readStringList(dis,ridList);
      mapQueryIDToResultSetName.put(queryId,ridList);
    }
    dis.close();
  }
 catch (  IOException ioe) {
    executionContext.addException(new EngineException("String_Node_Str",ioe));
    logger.log(Level.SEVERE,ioe.getMessage(),ioe);
  }
}
Program: 78567
Project: 78567
Buggy source:
private void storeDteMetaInfo(){
  try {
    ObjectOutputStream oos=new ObjectOutputStream(writer.createRandomAccessStream(DATA_META_STREAM));
    oos.writeObject(mapQueryIDToResultSetIDs);
    oos.writeObject(queryResultRelations);
    oos.writeObject(queryExpressionIDs);
    oos.close();
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
private void storeDteMetaInfo(){
  try {
    DataOutputStream dos=new DataOutputStream(writer.createRandomAccessStream(DATA_META_STREAM));
    int size=mapQueryIDToResultSetIDs.size();
    IOUtil.writeInt(dos,size);
    Set keySet=mapQueryIDToResultSetIDs.keySet();
    Iterator keyIter=keySet.iterator();
    while (keyIter.hasNext()) {
      String queryId=(String)keyIter.next();
      IOUtil.writeString(dos,queryId);
      LinkedList resultList=(LinkedList)mapQueryIDToResultSetIDs.get(queryId);
      writeStringList(dos,resultList);
    }
    size=queryResultRelations.size();
    IOUtil.writeInt(dos,size);
    for (int i=0; i < size; i++) {
      Key key=(Key)queryResultRelations.get(i);
      IOUtil.writeString(dos,key.parentRSID);
      IOUtil.writeString(dos,key.resultSetID);
      IOUtil.writeString(dos,key.rowid);
    }
    size=queryExpressionIDs.size();
    IOUtil.writeInt(dos,size);
    for (int i=0; i < size; i++) {
      QueryID queryId=(QueryID)queryExpressionIDs.get(i);
      writeQueryID(dos,queryId);
    }
    dos.close();
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
}
Program: 78568
Project: 78568
Buggy source:
private void loadDteMetaInfo(){
  try {
    ObjectInputStream ois=new ObjectInputStream(reader.getStream(DATA_META_STREAM));
    mapQueryIDToResultSetIDs=(HashMap)ois.readObject();
    queryResultRelations=(ArrayList)ois.readObject();
    queryExpressionIDs=(ArrayList)ois.readObject();
    ois.close();
  }
 catch (  IOException ioe) {
    context.addException(new EngineException("String_Node_Str",ioe));
    logger.log(Level.SEVERE,ioe.getMessage(),ioe);
  }
catch (  ClassNotFoundException cnfe) {
    context.addException(new EngineException("String_Node_Str",cnfe));
    logger.log(Level.SEVERE,cnfe.getMessage(),cnfe);
  }
}

Fixed version (ground truth):
private void loadDteMetaInfo(){
  try {
    DataInputStream dis=new DataInputStream(reader.getStream(DATA_META_STREAM));
    mapQueryIDToResultSetIDs=new HashMap();
    int size=IOUtil.readInt(dis);
    for (int i=0; i < size; i++) {
      String queryId=IOUtil.readString(dis);
      LinkedList ridList=new LinkedList();
      readStringList(dis,ridList);
      mapQueryIDToResultSetIDs.put(queryId,ridList);
    }
    size=IOUtil.readInt(dis);
    queryResultRelations=new ArrayList();
    for (int i=0; i < size; i++) {
      String parentRSID=IOUtil.readString(dis);
      String resultSetID=IOUtil.readString(dis);
      String rowid=IOUtil.readString(dis);
      Key key=new Key(parentRSID,rowid,resultSetID);
      queryResultRelations.add(key);
    }
    size=IOUtil.readInt(dis);
    queryExpressionIDs=new ArrayList();
    for (int i=0; i < size; i++) {
      QueryID queryId=new QueryID();
      readQueryID(dis,queryId);
      queryExpressionIDs.add(queryId);
    }
    dis.close();
  }
 catch (  IOException ioe) {
    context.addException(new EngineException("String_Node_Str",ioe));
    logger.log(Level.SEVERE,ioe.getMessage(),ioe);
  }
}
Program: 78569
Project: 78569
Buggy source:
public void moduleDisposed(ModuleHandle targetElement,DisposeEvent ev){
  ReportMediator media=(ReportMediator)mediatorMap.get(targetElement);
  if (media != null) {
    media.dispose();
    mediatorMap.remove(targetElement);
  }
  targetElement.removeDisposeListener(disposeLitener);
}

Fixed version (ground truth):
public void moduleDisposed(ModuleHandle targetElement,DisposeEvent ev){
  ReportMediator media=(ReportMediator)mediatorMap.get(targetElement);
  if (media != null) {
    media.dispose();
  }
  mediatorMap.remove(targetElement);
  targetElement.removeDisposeListener(this);
}
Program: 78570
Project: 78570
Buggy source:
/** 
 * Remove cached adapter
 * @param obj Key to find the adapter
 */
public void remove(Object obj){
  map.remove(obj);
}

Fixed version (ground truth):
/** 
 * Remove cached adapter
 * @param obj Key to find the adapter
 */
public void remove(Object obj){
  removeRelated(obj);
  map.remove(obj);
}
Program: 78572
Project: 78572
Buggy source:
/** 
 * @param rootPath - the absolute path of the root folder. The path is seperated by system's File seperator.
 * @param fullString - the absolute path of the stream. The path is seperated by system's File seperator.
 * @return the relative path string. The path is based on Unix syntax and starts with "/". 
 */
public static String generateRelativePath(String rootPath,String fullPath){
  String relativePath=null;
  if ((rootPath != null) && fullPath.startsWith(rootPath)) {
    relativePath=fullPath.substring(rootPath.length());
  }
 else   relativePath=fullPath;
  relativePath=convertToUnixString(relativePath);
  if (!relativePath.startsWith(UNIX_SEPERATOR))   relativePath=UNIX_SEPERATOR + relativePath.substring(1);
  return relativePath;
}

Fixed version (ground truth):
/** 
 * @param rootPath - the absolute path of the root folder. The path is seperated by system's File seperator.
 * @param fullString - the absolute path of the stream. The path is seperated by system's File seperator.
 * @return the relative path string. The path is based on Unix syntax and starts with "/". 
 */
public static String generateRelativePath(String rootPath,String fullPath){
  String relativePath=null;
  if ((rootPath != null) && fullPath.startsWith(rootPath)) {
    relativePath=fullPath.substring(rootPath.length());
  }
 else   relativePath=fullPath;
  relativePath=convertToUnixString(relativePath);
  if (!relativePath.startsWith(UNIX_SEPERATOR))   relativePath=UNIX_SEPERATOR + relativePath;
  return relativePath;
}
Program: 78574
Project: 78574
Buggy source:
public void close(){
  try {
    if (coreStream != null) {
      try {
        IOUtil.writeString(coreStream,designName);
        IOUtil.writeMap(coreStream,paramters);
        IOUtil.writeMap(coreStream,globalVariables);
      }
  finally {
        try {
          coreStream.close();
        }
 catch (        Exception ex) {
        }
      }
    }
    archive.finish();
  }
 catch (  IOException e) {
    logger.log(Level.SEVERE,"String_Node_Str",e);
  }
}

Fixed version (ground truth):
public void close(){
  try {
    if (coreStream != null) {
      try {
        IOUtil.writeString(coreStream,designName);
        IOUtil.writeMap(coreStream,paramters);
        IOUtil.writeMap(coreStream,globalVariables);
      }
  finally {
        try {
          coreStream.close();
        }
 catch (        Exception ex) {
        }
      }
    }
    archive.setStreamSorter(new ReportDocumentStreamSorter());
    archive.finish();
  }
 catch (  IOException e) {
    logger.log(Level.SEVERE,"String_Node_Str",e);
  }
}
Program: 78575
Project: 78575
Buggy source:
/** 
 * Removes the model listener.
 */
private void removeModelLister(){
  if (getModel() instanceof DesignElementHandle) {
    ((DesignElementHandle)getModel()).removeListener(this);
  }
}

Fixed version (ground truth):
/** 
 * Removes the model listener.
 */
protected void removeModelLister(){
  if (getModel() instanceof DesignElementHandle) {
    ((DesignElementHandle)getModel()).removeListener(this);
  }
}
Program: 78576
Project: 78576
Buggy source:
private void validateSelectedColumns(IBaseQueryDefinition query) throws EngineException {
}

Fixed version (ground truth):
private void validateSelectedColumns(ReportItemDesign reportItem) throws EngineException {
}
Program: 78577
Project: 78577
Buggy source:
public List getResultSetList() throws EngineException {
  if (resultMetaList == null) {
    if (isMetaDataPrepared == false) {
      prepareMetaData();
    }
    resultMetaList=new ArrayList();
    String dispName=null;
    IBaseQueryDefinition query=null;
    if (instanceId != null) {
      ReportItemDesign reportItem=(ReportItemDesign)report.getReportItemByID(instanceId.getComponentID());
      dispName=(String)mapReportItemToDisplayName.get(reportItem);
      query=reportItem.getQuery();
      addToResultSetList(query,dispName);
    }
 else {
      Set keySet=mapDispNameToQuery.keySet();
      Iterator keyIter=keySet.iterator();
      while (keyIter.hasNext()) {
        dispName=(String)keyIter.next();
        query=(IBaseQueryDefinition)mapDispNameToQuery.get(dispName);
        addToResultSetList(query,dispName);
      }
    }
  }
  return resultMetaList;
}

Fixed version (ground truth):
public List getResultSetList() throws EngineException {
  if (resultMetaList == null) {
    prepareMetaData();
    resultMetaList=new ArrayList();
    String dispName=null;
    if (instanceId != null) {
      ReportItemDesign reportItem=(ReportItemDesign)report.getReportItemByID(instanceId.getComponentID());
      dispName=(String)mapReportItemToDisplayName.get(reportItem);
      addToResultSetList(reportItem,dispName);
    }
 else {
      Set keySet=mapDispNameToResultSetName.keySet();
      Iterator keyIter=keySet.iterator();
      while (keyIter.hasNext()) {
        dispName=(String)keyIter.next();
        String resultSetName=(String)mapDispNameToResultSetName.get(dispName);
        ReportItemDesign reportItem=(ReportItemDesign)mapResultSetToReportItem.get(resultSetName);
        addToResultSetList(reportItem,dispName);
      }
    }
  }
  return resultMetaList;
}
Program: 78578
Project: 78578
Buggy source:
private void addToResultSetList(IBaseQueryDefinition query,String displayName){
}

Fixed version (ground truth):
private void addToResultSetList(ReportItemDesign reportItem,String displayName){
}
Program: 78579
Project: 78579
Buggy source:
private void prepareMetaData() throws EngineException {
}

Fixed version (ground truth):
private void prepareMetaData(){
}
Program: 78580
Project: 78580
Buggy source:
/** 
 * Returns the list of validation nodes.
 * @param element the element to validate
 * @param triggers the validation triggers
 * @param onlyOnSelf whether the validator is applied on the given element itself
 * @return the list of validation nodes
 */
public static List getValidationNodes(DesignElement element,SemanticTriggerDefnSet triggers,boolean onlyOnSelf){
  List nodes=new ArrayList();
  List validatorDefns=triggers.getTriggerList();
  if (validatorDefns != null && !validatorDefns.isEmpty()) {
    Iterator iter=validatorDefns.iterator();
    while (iter.hasNext()) {
      SemanticTriggerDefn triggerDefn=(SemanticTriggerDefn)iter.next();
      String targetName=triggerDefn.getTargetElement();
      if (StringUtil.isBlank(targetName)) {
        ValidationNode node=new ValidationNode(element,triggerDefn);
        nodes.add(node);
      }
 else {
        ElementDefn targetDefn=(ElementDefn)MetaDataDictionary.getInstance().getElement(targetName);
        ElementDefn elementDefn=(ElementDefn)element.getDefn();
        if (targetDefn.isKindOf(elementDefn) || !onlyOnSelf) {
          ValidationNode node=new ValidationNode(element,triggerDefn);
          nodes.add(node);
        }
      }
    }
  }
  return nodes;
}

Fixed version (ground truth):
/** 
 * Returns the list of validation nodes.
 * @param element the element to validate
 * @param triggers the validation triggers
 * @param onlyOnSelf whether the validator is applied on the given element itself
 * @return the list of validation nodes
 */
public static List getValidationNodes(DesignElement element,SemanticTriggerDefnSet triggers,boolean onlyOnSelf){
  List nodes=new ArrayList();
  List validatorDefns=triggers.getTriggerList();
  if (validatorDefns == null || validatorDefns.isEmpty())   return nodes;
  Iterator iter=validatorDefns.iterator();
  while (iter.hasNext()) {
    SemanticTriggerDefn triggerDefn=(SemanticTriggerDefn)iter.next();
    String targetName=triggerDefn.getTargetElement();
    if (StringUtil.isBlank(targetName)) {
      nodes.add(new ValidationNode(element,triggerDefn));
      continue;
    }
    ElementDefn targetDefn=(ElementDefn)MetaDataDictionary.getInstance().getElement(targetName);
    ElementDefn elementDefn=(ElementDefn)element.getDefn();
    if (targetDefn.isKindOf(elementDefn) || !onlyOnSelf)     nodes.add(new ValidationNode(element,triggerDefn));
  }
  return nodes;
}
Program: 78581
Project: 78581
Buggy source:
/** 
 * Reorganizes the nodes in the following aspects in order to improve the efficiency: <ul> <li>The duplicate validation is removed from the node list. <li>The pre-requisite validator is shifted to the beginning of the node list. </ul>
 * @param nodes the validation nodes to reorganize
 * @return the reorganized nodes
 */
private List reorganize(List nodes){
  List newList=new ArrayList();
  Iterator iter=nodes.iterator();
  while (iter.hasNext()) {
    ValidationNode node=(ValidationNode)iter.next();
    boolean found=false;
    int count=newList.size();
    for (int i=0; i < count; i++) {
      ValidationNode nodeInList=(ValidationNode)newList.get(i);
      String validationID1=node.getTriggerDefn().getValidationID();
      String validationID2=nodeInList.getTriggerDefn().getValidationID();
      if (StringUtil.isEqual(validationID1,validationID2)) {
        found=true;
        break;
      }
    }
    if (!found) {
      if (node.getTriggerDefn().isPreRequisite())       newList.add(0,node);
 else       newList.add(node);
    }
  }
  return newList;
}

Fixed version (ground truth):
/** 
 * Reorganizes the nodes in the following aspects in order to improve the efficiency: <ul> <li>The duplicate validation is removed from the node list. <li>The pre-requisite validator is shifted to the beginning of the node list. </ul>
 * @param nodes the validation nodes to reorganize
 * @return the reorganized nodes
 */
private List reorganize(List nodes){
  List newList=new ArrayList();
  Iterator iter=nodes.iterator();
  Set validationIDs=new HashSet();
  while (iter.hasNext()) {
    ValidationNode node=(ValidationNode)iter.next();
    String id=node.getTriggerDefn().getValidationID();
    if (!validationIDs.contains(id)) {
      validationIDs.add(id);
      if (node.getTriggerDefn().isPreRequisite())       newList.add(0,node);
 else       newList.add(node);
    }
  }
  return newList;
}
Program: 78582
Project: 78582
Buggy source:
/** 
 * @param groupKeyValues
 * @param columnNames
 * @param i
 * @return
 * @throws BirtException
 */
private boolean groupKeyValuesEqual(org.eclipse.birt.data.engine.odi.IResultIterator odiResult,Object[] groupKeyValues,String[] columnNames,int i) throws BirtException {
  Object fieldValue=odiResult.getCurrentResult().getFieldValue(columnNames[i]);
  boolean retValue=false;
  if (fieldValue == groupKeyValues[i]) {
    retValue=true;
  }
 else   if (fieldValue != null && groupKeyValues[i] != null) {
    if (fieldValue.getClass().equals(groupKeyValues[i].getClass())) {
      retValue=fieldValue.equals(groupKeyValues[i]);
    }
 else {
      Object convertedOb=DataTypeUtil.convert(groupKeyValues[i],fieldValue.getClass());
      retValue=fieldValue.equals(convertedOb);
    }
  }
  return retValue;
}

Fixed version (ground truth):
/** 
 * @param groupKeyValues
 * @param columnNames
 * @param i
 * @return
 * @throws BirtException
 */
private boolean groupKeyValuesEqual(org.eclipse.birt.data.engine.odi.IResultIterator odiResult,Object[] groupKeyValues,String[] columnNames,int i) throws BirtException {
  Object fieldValue=odiResult.getCurrentResult().getFieldValue(columnNames[i]);
  boolean retValue=false;
  if (fieldValue == groupKeyValues[i]) {
    retValue=true;
  }
 else   if (fieldValue != null && groupKeyValues[i] != null) {
    if (fieldValue.getClass().equals(groupKeyValues[i].getClass())) {
      retValue=isTwoObjectEqual(fieldValue,groupKeyValues[i]);
    }
 else {
      Object convertedOb=DataTypeUtil.convert(groupKeyValues[i],fieldValue.getClass());
      retValue=isTwoObjectEqual(fieldValue,convertedOb);
    }
  }
  return retValue;
}
Program: 78583
Project: 78583
Buggy source:
/** 
 * A convenience method provided to lookup externalized messages associated with a given message key.
 * @param sChartKey The key using which an externalized message is being looked up.
 * @return The externalized message associated with the specified key.
 */
public final String externalizedMessage(String sChartKey){
  if (iml == null) {
    final int iKeySeparator=sChartKey.indexOf(IMessageLookup.KEY_SEPARATOR);
    if (iKeySeparator != -1) {
      return sChartKey.substring(iKeySeparator + 1);
    }
    return sChartKey;
  }
  return iml.getMessageValue(sChartKey,lcl);
}

Fixed version (ground truth):
/** 
 * A convenience method provided to lookup externalized messages associated with a given message key.
 * @param sChartKey The key using which an externalized message is being looked up.
 * @return The externalized message associated with the specified key.
 */
public final String externalizedMessage(String sChartKey){
  String sKey=sChartKey;
  String sDefaultValue=sChartKey;
  final int iKeySeparator=sChartKey.indexOf(IMessageLookup.KEY_SEPARATOR);
  if (iKeySeparator != -1) {
    sDefaultValue=sChartKey.substring(iKeySeparator + 1);
  }
  if (iml == null) {
    return sDefaultValue;
  }
 else {
    if (iKeySeparator > 0) {
      sKey=sChartKey.substring(0,iKeySeparator);
    }
 else     if (iKeySeparator == 0) {
      return sDefaultValue;
    }
 else {
      sKey=sDefaultValue;
    }
    String localizedValue=iml.getMessageValue(sKey,getLocale());
    if (localizedValue == null || localizedValue.equals("String_Node_Str"))     return sDefaultValue;
 else     return localizedValue;
  }
}
Program: 78585
Project: 78585
Buggy source:
public void widgetSelected(SelectionEvent e){
  ExternalizedTextEditorDialog editor=new ExternalizedTextEditorDialog(getShell(),SWT.APPLICATION_MODAL,buildString(),keys,serviceprovider);
  String sTxt=editor.open();
  if (sTxt != null) {
    this.setText(sTxt);
    if (sKey == null || sKey.length() == 0) {
      txtSelection.setEnabled(true);
    }
 else {
      txtSelection.setEnabled(false);
    }
    fireEvent();
  }
}

Fixed version (ground truth):
public void widgetSelected(SelectionEvent e){
  ExternalizedTextEditorDialog editor=new ExternalizedTextEditorDialog(getShell(),SWT.APPLICATION_MODAL,buildString(),keys,serviceprovider);
  String sTxt=editor.open(sCurrent);
  if (sTxt != null) {
    this.setText(sTxt);
    fireEvent();
  }
}
Program: 78586
Project: 78586
Buggy source:
private String buildString(){
  return sKey + ExternalizedTextEditorComposite.SEPARATOR + sCurrent;
}

Fixed version (ground truth):
private String buildString(){
  if (sKey != null && !sKey.equals("String_Node_Str")) {
    return sKey + ExternalizedTextEditorComposite.SEPARATOR + sCurrent;
  }
 else   return sCurrent;
}
Program: 78587
Project: 78587
Buggy source:
public void setEnabled(boolean bState){
  this.txtSelection.setEnabled(bState);
  this.btnDown.setEnabled(bState);
  this.bEnabled=bState;
}

Fixed version (ground truth):
public void setEnabled(boolean bState){
  if (bState) {
    if (sKey == null || sKey.length() == 0) {
      txtSelection.setEnabled(true);
    }
  }
 else {
    this.txtSelection.setEnabled(bState);
  }
  this.btnDown.setEnabled(bState);
  this.bEnabled=bState;
}
Program: 78588
Project: 78588
Buggy source:
public String getValue(String str){
  String sTmp="String_Node_Str";
  sTmp=getKey(str);
  if ("String_Node_Str".equals(sTmp)) {
    int iSeparator=str.indexOf(SEPARATOR) + SEPARATOR.length();
    if (iSeparator == (-1 + SEPARATOR.length())) {
      iSeparator=0;
    }
    return str.substring(iSeparator);
  }
  sTmp=serviceprovider.getValue(sTmp);
  if (sTmp == null || "String_Node_Str".equals(sTmp)) {
    sTmp=Messages.getString("String_Node_Str");
  }
  return sTmp;
}

Fixed version (ground truth):
public String getValue(String str){
  int iSeparator=str.indexOf(SEPARATOR) + SEPARATOR.length();
  if (iSeparator == (-1 + SEPARATOR.length())) {
    iSeparator=0;
  }
  return str.substring(iSeparator);
}
Program: 78589
Project: 78589
Buggy source:
public ExternalizedTextEditorComposite(Composite parent,int style,int iHeightHint,int iWidthHint,List keys,IUIServiceProvider serviceprovider,String sText){
  super(parent,SWT.NONE);
  this.iStyle=style;
  this.iHeightHint=iHeightHint;
  this.iWidthHint=iWidthHint;
  this.keys=keys;
  this.serviceprovider=serviceprovider;
  sKey=getKey(sText);
  sCurrent=getValue(sText);
  init();
  placeComponents();
}

Fixed version (ground truth):
public ExternalizedTextEditorComposite(Composite parent,int style,int iHeightHint,int iWidthHint,List keys,IUIServiceProvider serviceprovider,String sText){
  super(parent,SWT.NONE);
  this.iStyle=style;
  this.iHeightHint=iHeightHint;
  this.iWidthHint=iWidthHint;
  this.keys=keys;
  this.serviceprovider=serviceprovider;
  init();
  placeComponents();
  setText(sText);
}
Program: 78590
Project: 78590
Buggy source:
private void placeComponents(){
  GridLayout glContent=new GridLayout();
  glContent.numColumns=2;
  glContent.horizontalSpacing=1;
  glContent.marginHeight=0;
  glContent.marginWidth=0;
  this.setLayout(glContent);
  txtSelection=new TextEditorComposite(this,iStyle);
  if (sKey == null || sKey.length() == 0) {
    txtSelection.setEnabled(true);
  }
 else {
    txtSelection.setEnabled(false);
  }
  txtSelection.setText(sCurrent);
  GridData gdTXTSelection=new GridData(GridData.FILL_HORIZONTAL);
  if (iHeightHint > 0) {
    gdTXTSelection.heightHint=iHeightHint - 10;
  }
  if (iWidthHint > 0) {
    gdTXTSelection.widthHint=iWidthHint;
  }
  txtSelection.setLayoutData(gdTXTSelection);
  txtSelection.addListener(this);
  btnDown=new Button(this,SWT.PUSH);
  GridData gdBTNDown=new GridData(GridData.VERTICAL_ALIGN_END);
  gdBTNDown.heightHint=iSize;
  gdBTNDown.widthHint=iSize;
  btnDown.setText("String_Node_Str");
  btnDown.setToolTipText(Messages.getString("String_Node_Str"));
  btnDown.setLayoutData(gdBTNDown);
  btnDown.addSelectionListener(this);
}

Fixed version (ground truth):
private void placeComponents(){
  GridLayout glContent=new GridLayout();
  glContent.numColumns=2;
  glContent.horizontalSpacing=1;
  glContent.marginHeight=0;
  glContent.marginWidth=0;
  this.setLayout(glContent);
  txtSelection=new TextEditorComposite(this,iStyle);
  GridData gdTXTSelection=new GridData(GridData.FILL_HORIZONTAL);
  if (iHeightHint > 0) {
    gdTXTSelection.heightHint=iHeightHint - 10;
  }
  if (iWidthHint > 0) {
    gdTXTSelection.widthHint=iWidthHint;
  }
  txtSelection.setLayoutData(gdTXTSelection);
  txtSelection.addListener(this);
  btnDown=new Button(this,SWT.PUSH);
  GridData gdBTNDown=new GridData(GridData.VERTICAL_ALIGN_END);
  gdBTNDown.heightHint=iSize;
  gdBTNDown.widthHint=iSize;
  btnDown.setText("String_Node_Str");
  btnDown.setToolTipText(Messages.getString("String_Node_Str"));
  btnDown.setLayoutData(gdBTNDown);
  btnDown.addSelectionListener(this);
}
Program: 78591
Project: 78591
Buggy source:
public void setText(String str){
  sKey=getKey(str);
  sCurrent=getValue(str);
  txtSelection.setText(sCurrent);
}

Fixed version (ground truth):
public void setText(String str){
  sKey=getKey(str);
  sCurrent=getValue(str);
  txtSelection.setText(getLocalizedValue(str));
  if (sKey == null || sKey.length() == 0) {
    txtSelection.setEnabled(true);
  }
 else {
    txtSelection.setEnabled(false);
  }
}
Program: 78592
Project: 78592
Buggy source:
private String getDisplayValue(){
  if (cbExternalize.getSelection()) {
    return new MessageFormat(Messages.getString("String_Node_Str")).format(new Object[]{getKeyComponent(sResult)});
  }
  return getValueComponent(sResult);
}

Fixed version (ground truth):
private String getDisplayValue(){
  if (cbExternalize.getSelection()) {
    if (defaultValue == null || defaultValue.equals("String_Node_Str"))     return new MessageFormat(Messages.getString("String_Node_Str")).format(new Object[]{getKeyComponent(sResult)});
 else     return defaultValue;
  }
  return getValueComponent(sResult);
}
Program: 78593
Project: 78593
Buggy source:
private String buildString(){
  StringBuffer sbText=new StringBuffer("String_Node_Str");
  String sKey=cmbKeys.getText();
  if (cbExternalize.getSelection()) {
    sbText.append(sKey);
    sbText.append(ExternalizedTextEditorComposite.SEPARATOR);
  }
  sbText.append(txtValue.getText());
  return sbText.toString();
}

Fixed version (ground truth):
/** 
 * @return "key=defaultValue"
 */
private String buildString(){
  StringBuffer sbText=new StringBuffer("String_Node_Str");
  String sKey=cmbKeys.getText();
  if (cbExternalize.getSelection()) {
    sbText.append(sKey);
    sbText.append(ExternalizedTextEditorComposite.SEPARATOR);
  }
  sbText.append(txtValue.getText());
  return sbText.toString();
}
Program: 78594
Project: 78594
Buggy source:
public String open(){
  Shell parent=getParent();
  shell=new Shell(parent,SWT.DIALOG_TRIM | SWT.RESIZE | SWT.APPLICATION_MODAL);
  shell.setText(Messages.getString("String_Node_Str"));
  shell.setLayout(new FillLayout());
  placeComponents(shell);
  shell.pack();
  shell.setDefaultButton(btnAccept);
  UIHelper.centerOnScreen(shell);
  shell.open();
  Display display=parent.getDisplay();
  while (!shell.isDisposed()) {
    if (!display.readAndDispatch())     display.sleep();
  }
  return sResult;
}

Fixed version (ground truth):
public String open(String defaultValue){
  Shell parent=getParent();
  shell=new Shell(parent,SWT.DIALOG_TRIM | SWT.RESIZE | SWT.APPLICATION_MODAL);
  shell.setText(Messages.getString("String_Node_Str"));
  shell.setLayout(new FillLayout());
  this.defaultValue=defaultValue;
  placeComponents(shell);
  shell.pack();
  shell.setDefaultButton(btnAccept);
  UIHelper.centerOnScreen(shell);
  shell.open();
  Display display=parent.getDisplay();
  while (!shell.isDisposed()) {
    if (!display.readAndDispatch())     display.sleep();
  }
  return sResult;
}
Program: 78597
Project: 78597
Buggy source:
public void handleEvent(Event event){
  if (event.widget.equals(txtTitle)) {
    seriesDefn.getDesignTimeSeries().setSeriesIdentifier(txtTitle.getValue(txtTitle.getText()));
  }
}

Fixed version (ground truth):
public void handleEvent(Event event){
  if (event.widget.equals(txtTitle)) {
    seriesDefn.getDesignTimeSeries().setSeriesIdentifier(txtTitle.getText());
  }
}
Program: 78598
Project: 78598
Buggy source:
public Object get(String name,Scriptable scope){
  if (queryExecutor == null)   return null;
  Object paramValue=null;
  if (valueMap.containsKey(name)) {
    paramValue=valueMap.get(name);
  }
 else {
    try {
      if (queryExecutor.getPreparedOdiQuery() != null) {
        paramValue=queryExecutor.getPreparedOdiQuery().getOutputParameterValue(name);
        valueMap.put(name,paramValue);
      }
    }
 catch (    DataException e) {
    }
  }
  return paramValue;
}

Fixed version (ground truth):
public Object get(String name,Scriptable scope){
  if (queryExecutor == null)   return null;
  Object paramValue=null;
  if (valueMap.containsKey(name)) {
    paramValue=valueMap.get(name);
  }
 else {
    try {
      if (queryExecutor.getPreparedOdiQuery() != null) {
        paramValue=queryExecutor.getPreparedOdiQuery().getOutputParameterValue(name);
        valueMap.put(name,paramValue);
      }
    }
 catch (    DataException e) {
    }
  }
  return JavascriptEvalUtil.convertToJavascriptValue(paramValue,queryExecutor.getDataEngine().getSharedScope());
}
Program: 78599
Project: 78599
Buggy source:
/** 
 * Gets a named property
 */
public Object get(String name,Scriptable start){
  logger.entering(JSRowObject.class.getName(),"String_Node_Str",name);
  if (name.equals(DATA_SET)) {
    if (logger.isLoggable(Level.FINER))     logger.exiting(JSRowObject.class.getName(),"String_Node_Str");
    return dataSet.getJSDataSetObject();
  }
 else   if (name.equals(COLUMN_MD)) {
    if (logger.isLoggable(Level.FINER))     logger.exiting(JSRowObject.class.getName(),"String_Node_Str",getColumnMetadataScriptable());
    return getColumnMetadataScriptable();
  }
 else   if (name.equals(ROW_POSITION)) {
    try {
      return new Integer(dataSet.getCurrentRowIndex());
    }
 catch (    DataException e) {
      logger.logp(Level.FINER,JSColumnDefn.class.getName(),"String_Node_Str",e.getMessage(),e);
    }
  }
  try {
    return dataSet.getDataRow().getColumnValue(name);
  }
 catch (  BirtException e) {
    logger.logp(Level.FINER,JSColumnDefn.class.getName(),"String_Node_Str",e.getMessage(),e);
    return new DataExceptionMocker(e);
  }
}

Fixed version (ground truth):
/** 
 * Gets a named property
 */
public Object get(String name,Scriptable start){
  logger.entering(JSRowObject.class.getName(),"String_Node_Str",name);
  if (name.equals(DATA_SET)) {
    if (logger.isLoggable(Level.FINER))     logger.exiting(JSRowObject.class.getName(),"String_Node_Str");
    return dataSet.getJSDataSetObject();
  }
 else   if (name.equals(COLUMN_MD)) {
    if (logger.isLoggable(Level.FINER))     logger.exiting(JSRowObject.class.getName(),"String_Node_Str",getColumnMetadataScriptable());
    return getColumnMetadataScriptable();
  }
 else   if (name.equals(ROW_POSITION)) {
    try {
      return new Integer(dataSet.getCurrentRowIndex());
    }
 catch (    DataException e) {
      logger.logp(Level.FINER,JSColumnDefn.class.getName(),"String_Node_Str",e.getMessage(),e);
    }
  }
  try {
    Object value=dataSet.getDataRow().getColumnValue(name);
    return JavascriptEvalUtil.convertToJavascriptValue(value,dataSet.getDataEngine().getSharedScope());
  }
 catch (  BirtException e) {
    logger.logp(Level.FINER,JSColumnDefn.class.getName(),"String_Node_Str",e.getMessage(),e);
    return new DataExceptionMocker(e);
  }
}
Program: 78600
Project: 78600
Buggy source:
/** 
 * Sets an indexed property
 */
public void put(int index,Scriptable start,Object value){
  logger.entering(JSRowObject.class.getName(),"String_Node_Str",new Integer(index));
  value=getRealValue(value);
  try {
    dataSet.getDataRow().setColumnValue(index,value);
  }
 catch (  BirtException e) {
    logger.logp(Level.FINER,JSColumnDefn.class.getName(),"String_Node_Str",e.getMessage(),e);
  }
  logger.exiting(JSRowObject.class.getName(),"String_Node_Str");
}

Fixed version (ground truth):
/** 
 * Sets an indexed property
 */
public void put(int index,Scriptable start,Object value){
  logger.entering(JSRowObject.class.getName(),"String_Node_Str",new Integer(index));
  value=JavascriptEvalUtil.convertJavascriptValue(value);
  try {
    dataSet.getDataRow().setColumnValue(index,value);
  }
 catch (  BirtException e) {
    logger.logp(Level.FINER,JSColumnDefn.class.getName(),"String_Node_Str",e.getMessage(),e);
  }
  logger.exiting(JSRowObject.class.getName(),"String_Node_Str");
}