nus-yam/ex-repair huggingface dataset:
Program: 113628
Project: 113628
Buggy source:
@Override public void setOwnerAndGroup(String owner,String group){
  BufferBackedXLocList xLocList=rcMetadata.getXLocList();
  BufferBackedRCMetadata tmp=isDirectory() ? new BufferBackedRCMetadata(0,rcMetadata.getFileName(),owner,group,rcMetadata.getId(),rcMetadata.getPerms(),rcMetadata.getW32Attrs(),rcMetadata.getLinkCount()) : new BufferBackedRCMetadata(0,rcMetadata.getFileName(),owner,group,rcMetadata.getId(),rcMetadata.getPerms(),rcMetadata.getW32Attrs(),rcMetadata.getLinkCount(),rcMetadata.getEpoch(),rcMetadata.getIssuedEpoch(),rcMetadata.isReadOnly());
  rcMetadata=new BufferBackedRCMetadata(rcMetadata == null ? null : rcMetadata.getKey(),tmp.getValue());
  rcMetadata.setXLocList(xLocList);
}

Fixed version (ground truth):
@Override public void setOwnerAndGroup(String owner,String group){
  BufferBackedXLocList xLocList=rcMetadata.getXLocList();
  BufferBackedRCMetadata tmp=isDirectory() ? new BufferBackedRCMetadata(0,rcMetadata.getFileName(),owner,group,rcMetadata.getId(),rcMetadata.getPerms(),rcMetadata.getW32Attrs(),rcMetadata.getLinkCount()) : new BufferBackedRCMetadata(0,rcMetadata.getFileName(),owner,group,rcMetadata.getId(),rcMetadata.getPerms(),rcMetadata.getW32Attrs(),rcMetadata.getLinkCount(),rcMetadata.getEpoch(),rcMetadata.getIssuedEpoch(),rcMetadata.isReadOnly());
  rcMetadata=new BufferBackedRCMetadata(rcMetadata == null ? null : rcMetadata.getKey(),tmp.getValue());
  if (!rcMetadata.isDirectory())   rcMetadata.setXLocList(xLocList);
}
Program: 113629
Project: 113629
Buggy source:
public void setXLocList(BufferBackedXLocList xLocList){
  int index=valBuf.getShort(RC_XLOC_OFFSET);
  byte[] bytes=this.valBuf.array();
  byte[] xLocBytes=xLocList == null ? new byte[0] : xLocList.getBuffer();
  byte[] tmp=new byte[index + xLocBytes.length];
  System.arraycopy(bytes,0,tmp,0,index);
  System.arraycopy(xLocBytes,0,tmp,index,xLocBytes.length);
  this.valBuf=ByteBuffer.wrap(tmp);
  cachedXLocList=xLocList;
}

Fixed version (ground truth):
public void setXLocList(BufferBackedXLocList xLocList){
}
Program: 113630
Project: 113630
Buggy source:
public static BufferBackedFileMetadata getMetadata(BabuDB database,String dbName,long parentId,String fileName) throws BabuDBException {
  byte[] rcKey=BabuDBStorageHelper.createFileKey(parentId,fileName,FileMetadata.RC_METADATA);
  byte[] rcValue=database.directLookup(dbName,BabuDBStorageManager.FILE_INDEX,rcKey);
  if (rcValue != null) {
    if (rcValue[0] == 2)     return resolveLink(database,dbName,rcValue);
    byte[][] keyBufs=new byte[][]{BabuDBStorageHelper.createFileKey(parentId,fileName,FileMetadata.FC_METADATA),rcKey,BabuDBStorageHelper.createFileKey(parentId,fileName,FileMetadata.XLOC_METADATA)};
    byte[][] valBufs=new byte[][]{database.directLookup(dbName,BabuDBStorageManager.FILE_INDEX,keyBufs[0]),rcValue,database.directLookup(dbName,BabuDBStorageManager.FILE_INDEX,keyBufs[2])};
    return new BufferBackedFileMetadata(keyBufs,valBufs,BabuDBStorageManager.FILE_INDEX);
  }
 else   return null;
}

Fixed version (ground truth):
public static BufferBackedFileMetadata getMetadata(BabuDB database,String dbName,long parentId,String fileName) throws BabuDBException {
  byte[] rcKey=BabuDBStorageHelper.createFileKey(parentId,fileName,FileMetadata.RC_METADATA);
  byte[] rcValue=database.directLookup(dbName,BabuDBStorageManager.FILE_INDEX,rcKey);
  if (rcValue != null) {
    if (rcValue[0] == 2)     return resolveLink(database,dbName,rcValue,fileName);
    byte[][] keyBufs=new byte[][]{BabuDBStorageHelper.createFileKey(parentId,fileName,FileMetadata.FC_METADATA),rcKey,BabuDBStorageHelper.createFileKey(parentId,fileName,FileMetadata.XLOC_METADATA)};
    byte[][] valBufs=new byte[][]{database.directLookup(dbName,BabuDBStorageManager.FILE_INDEX,keyBufs[0]),rcValue,database.directLookup(dbName,BabuDBStorageManager.FILE_INDEX,keyBufs[2])};
    return new BufferBackedFileMetadata(keyBufs,valBufs,BabuDBStorageManager.FILE_INDEX);
  }
 else   return null;
}
Program: 113632
Project: 113632
Buggy source:
/** 
 * Recursively deletes all contents of the given directory.
 * @param file the directory to delete
 */
public static void delTree(File file){
  if (!file.exists())   return;
  for (  File f : file.listFiles()) {
    if (f.isDirectory())     delTree(f);
 else     f.delete();
  }
  file.delete();
}

Fixed version (ground truth):
/** 
 * Recursively deletes all contents of the given directory.
 * @param file the directory to delete
 */
public static void delTree(File file){
  if (!file.exists())   return;
  File[] fileList;
  if ((fileList=file.listFiles()) != null) {
    for (    File f : fileList) {
      if (f.isDirectory())       delTree(f);
 else       f.delete();
    }
  }
  file.delete();
}
Program: 113633
Project: 113633
Buggy source:
public void startup() throws Exception {
  TimeSync.initializeLocal(config.getRemoteTimeSync(),config.getLocalClockRenew());
  clientStage.start();
  clientStage.waitForStartup();
  UUIDResolver.start(dirClient,10 * 1000,600 * 1000);
  UUIDResolver.addLocalMapping(config.getUUID(),config.getPort(),config.isUsingSSL());
  TimeSync.getInstance().enableRemoteSynchronization(dirClient);
  osdMonitor.start();
  osdMonitor.waitForStartup();
  procStage.start();
  procStage.waitForStartup();
  volumeManager.init();
  volumeManager.addVolumeChangeListener(osdMonitor);
  heartbeatThread.start();
  serverStage.start();
  serverStage.waitForStartup();
  Logging.logMessage(Logging.LEVEL_INFO,this,"String_Node_Str" + config.getPort());
}

Fixed version (ground truth):
public void startup() throws Exception {
  TimeSync.initializeLocal(config.getRemoteTimeSync(),config.getLocalClockRenew());
  clientStage.start();
  clientStage.waitForStartup();
  UUIDResolver.start(dirClient,10 * 1000,600 * 1000);
  UUIDResolver.addLocalMapping(config.getUUID(),config.getPort(),config.isUsingSSL());
  osdMonitor.start();
  osdMonitor.waitForStartup();
  procStage.start();
  procStage.waitForStartup();
  volumeManager.init();
  volumeManager.addVolumeChangeListener(osdMonitor);
  heartbeatThread.start();
  serverStage.start();
  serverStage.waitForStartup();
  Logging.logMessage(Logging.LEVEL_INFO,this,"String_Node_Str" + config.getPort());
}
Program: 113634
Project: 113634
Buggy source:
public RPCResponse xtreemfs_restore_file(InetSocketAddress server,String filePath,String fileId,long fileSizeInBytes,String osdUUID,int stripeSizeInKB){
  xtreemfs_restore_fileRequest rq=new xtreemfs_restore_fileRequest(filePath,fileId,fileSizeInBytes,osdUUID,stripeSizeInKB);
  RPCResponse r=sendRequest(server,rq.getOperationNumber(),rq,new RPCResponseDecoder(){
    @Override public Object getResult(    ReusableBuffer data){
      final xtreemfs_restore_fileResponse resp=new xtreemfs_restore_fileResponse();
      resp.deserialize(data);
      return null;
    }
  }
);
  return r;
}

Fixed version (ground truth):
public RPCResponse xtreemfs_restore_file(InetSocketAddress server,String filePath,String fileId,long fileSizeInBytes,String osdUUID,int stripeSizeInKB,UserCredentials credentials){
  xtreemfs_restore_fileRequest rq=new xtreemfs_restore_fileRequest(filePath,fileId,fileSizeInBytes,osdUUID,stripeSizeInKB);
  RPCResponse r=sendRequest(server,rq.getOperationNumber(),rq,new RPCResponseDecoder(){
    @Override public Object getResult(    ReusableBuffer data){
      final xtreemfs_restore_fileResponse resp=new xtreemfs_restore_fileResponse();
      resp.deserialize(data);
      return null;
    }
  }
,credentials);
  return r;
}
Program: 113636
Project: 113636
Buggy source:
public RPCResponse<Boolean> internal_cleanup_is_running(InetSocketAddress server,String password){
  xtreemfs_cleanup_is_runningRequest rq=new xtreemfs_cleanup_is_runningRequest();
  UserCredentials creds=new UserCredentials("String_Node_Str",new StringSet(),password);
  RPCResponse r=sendRequest(server,rq.getOperationNumber(),rq,new RPCResponseDecoder(){
    @Override public Object getResult(    ReusableBuffer data){
      xtreemfs_cleanup_is_runningResponse resp=new xtreemfs_cleanup_is_runningResponse();
      resp.deserialize(data);
      return resp.getIs_running();
    }
  }
,creds);
  return r;
}

Fixed version (ground truth):
public RPCResponse<Boolean> internal_cleanup_is_running(InetSocketAddress server,String password){
  xtreemfs_cleanup_is_runningRequest rq=new xtreemfs_cleanup_is_runningRequest();
  UserCredentials creds=new UserCredentials("String_Node_Str",new StringSet(new String[]{"String_Node_Str"}),password);
  RPCResponse r=sendRequest(server,rq.getOperationNumber(),rq,new RPCResponseDecoder(){
    @Override public Object getResult(    ReusableBuffer data){
      xtreemfs_cleanup_is_runningResponse resp=new xtreemfs_cleanup_is_runningResponse();
      resp.deserialize(data);
      return resp.getIs_running();
    }
  }
,creds);
  return r;
}
Program: 113637
Project: 113637
Buggy source:
public RPCResponse internal_cleanup_stop(InetSocketAddress server,String password){
  xtreemfs_cleanup_stopRequest rq=new xtreemfs_cleanup_stopRequest();
  UserCredentials creds=new UserCredentials("String_Node_Str",new StringSet(),password);
  RPCResponse r=sendRequest(server,rq.getOperationNumber(),rq,new RPCResponseDecoder(){
    @Override public Object getResult(    ReusableBuffer data){
      xtreemfs_cleanup_stopResponse resp=new xtreemfs_cleanup_stopResponse();
      resp.deserialize(data);
      return null;
    }
  }
,creds);
  return r;
}

Fixed version (ground truth):
public RPCResponse internal_cleanup_stop(InetSocketAddress server,String password){
  xtreemfs_cleanup_stopRequest rq=new xtreemfs_cleanup_stopRequest();
  UserCredentials creds=new UserCredentials("String_Node_Str",new StringSet(new String[]{"String_Node_Str"}),password);
  RPCResponse r=sendRequest(server,rq.getOperationNumber(),rq,new RPCResponseDecoder(){
    @Override public Object getResult(    ReusableBuffer data){
      xtreemfs_cleanup_stopResponse resp=new xtreemfs_cleanup_stopResponse();
      resp.deserialize(data);
      return null;
    }
  }
,creds);
  return r;
}
Program: 113638
Project: 113638
Buggy source:
public RPCResponse internal_cleanup_start(InetSocketAddress server,boolean removeZombies,boolean removeDeadVolumes,boolean lostAndFound,String password){
  xtreemfs_cleanup_startRequest rq=new xtreemfs_cleanup_startRequest(removeZombies,removeDeadVolumes,lostAndFound);
  UserCredentials creds=new UserCredentials("String_Node_Str",new StringSet(),password);
  RPCResponse r=sendRequest(server,rq.getOperationNumber(),rq,new RPCResponseDecoder(){
    @Override public Object getResult(    ReusableBuffer data){
      xtreemfs_cleanup_startResponse resp=new xtreemfs_cleanup_startResponse();
      resp.deserialize(data);
      return null;
    }
  }
,creds);
  return r;
}

Fixed version (ground truth):
public RPCResponse internal_cleanup_start(InetSocketAddress server,boolean removeZombies,boolean removeDeadVolumes,boolean lostAndFound,String password){
  xtreemfs_cleanup_startRequest rq=new xtreemfs_cleanup_startRequest(removeZombies,removeDeadVolumes,lostAndFound);
  UserCredentials creds=new UserCredentials("String_Node_Str",new StringSet(new String[]{"String_Node_Str"}),password);
  RPCResponse r=sendRequest(server,rq.getOperationNumber(),rq,new RPCResponseDecoder(){
    @Override public Object getResult(    ReusableBuffer data){
      xtreemfs_cleanup_startResponse resp=new xtreemfs_cleanup_startResponse();
      resp.deserialize(data);
      return null;
    }
  }
,creds);
  return r;
}
Program: 113639
Project: 113639
Buggy source:
public RPCResponse<String> internal_cleanup_status(InetSocketAddress server,String password){
  xtreemfs_cleanup_statusRequest rq=new xtreemfs_cleanup_statusRequest();
  UserCredentials creds=new UserCredentials("String_Node_Str",new StringSet(),password);
  RPCResponse r=sendRequest(server,rq.getOperationNumber(),rq,new RPCResponseDecoder(){
    @Override public Object getResult(    ReusableBuffer data){
      xtreemfs_cleanup_statusResponse resp=new xtreemfs_cleanup_statusResponse();
      resp.deserialize(data);
      return resp.getStatus();
    }
  }
,creds);
  return r;
}

Fixed version (ground truth):
public RPCResponse<String> internal_cleanup_status(InetSocketAddress server,String password){
  xtreemfs_cleanup_statusRequest rq=new xtreemfs_cleanup_statusRequest();
  UserCredentials creds=new UserCredentials("String_Node_Str",new StringSet(new String[]{"String_Node_Str"}),password);
  RPCResponse r=sendRequest(server,rq.getOperationNumber(),rq,new RPCResponseDecoder(){
    @Override public Object getResult(    ReusableBuffer data){
      xtreemfs_cleanup_statusResponse resp=new xtreemfs_cleanup_statusResponse();
      resp.deserialize(data);
      return resp.getStatus();
    }
  }
,creds);
  return r;
}
Program: 113640
Project: 113640
Buggy source:
public RPCResponse<StringSet> internal_cleanup_get_result(InetSocketAddress server,String password){
  xtreemfs_cleanup_get_resultsRequest rq=new xtreemfs_cleanup_get_resultsRequest();
  UserCredentials creds=new UserCredentials("String_Node_Str",new StringSet(),password);
  RPCResponse r=sendRequest(server,rq.getOperationNumber(),rq,new RPCResponseDecoder(){
    @Override public Object getResult(    ReusableBuffer data){
      xtreemfs_cleanup_get_resultsResponse resp=new xtreemfs_cleanup_get_resultsResponse();
      resp.deserialize(data);
      return resp.getResults();
    }
  }
,creds);
  return r;
}

Fixed version (ground truth):
public RPCResponse<StringSet> internal_cleanup_get_result(InetSocketAddress server,String password){
  xtreemfs_cleanup_get_resultsRequest rq=new xtreemfs_cleanup_get_resultsRequest();
  UserCredentials creds=new UserCredentials("String_Node_Str",new StringSet(new String[]{"String_Node_Str"}),password);
  RPCResponse r=sendRequest(server,rq.getOperationNumber(),rq,new RPCResponseDecoder(){
    @Override public Object getResult(    ReusableBuffer data){
      xtreemfs_cleanup_get_resultsResponse resp=new xtreemfs_cleanup_get_resultsResponse();
      resp.deserialize(data);
      return resp.getResults();
    }
  }
,creds);
  return r;
}
Program: 113641
Project: 113641
Buggy source:
@Override public void startRequest(final OSDRequest rq){
  UserCredentials uc=rq.getRPCRequest().getUserCredentials();
  if ((uc == null) || (!uc.getPassword().equals(master.getConfig().getAdminPassword()))) {
    rq.sendOSDException(ErrorCodes.AUTH_FAILED,"String_Node_Str");
    return;
  }
  xtreemfs_cleanup_startRequest args=(xtreemfs_cleanup_startRequest)rq.getRequestArgs();
  master.getCleanupThread().cleanupStart(args.getRemove_zombies(),args.getRemove_unavail_volume(),args.getLost_and_found());
  xtreemfs_cleanup_startResponse response=new xtreemfs_cleanup_startResponse();
  rq.sendSuccess(response);
}

Fixed version (ground truth):
@Override public void startRequest(final OSDRequest rq){
  UserCredentials uc=rq.getRPCRequest().getUserCredentials();
  if ((uc == null) || (!uc.getPassword().equals(master.getConfig().getAdminPassword()))) {
    rq.sendOSDException(ErrorCodes.AUTH_FAILED,"String_Node_Str");
    return;
  }
  xtreemfs_cleanup_startRequest args=(xtreemfs_cleanup_startRequest)rq.getRequestArgs();
  master.getCleanupThread().cleanupStart(args.getRemove_zombies(),args.getRemove_unavail_volume(),args.getLost_and_found(),uc);
  xtreemfs_cleanup_startResponse response=new xtreemfs_cleanup_startResponse();
  rq.sendSuccess(response);
}
Program: 113642
Project: 113642
Buggy source:
public int write(byte[] data,int offset,int length,long filePosition) throws Exception {
  final int firstObject=(int)(filePosition / this.stripeSize);
  int lastObject=(int)((filePosition + ((long)length)) / this.stripeSize);
  if (((filePosition + ((long)length)) % this.stripeSize) == 0)   lastObject--;
  final int offsetInFirstObject=(int)(filePosition % this.stripeSize);
  int bytesInLastObject=-1;
  if (firstObject == lastObject) {
    bytesInLastObject=length;
  }
 else {
    if (((filePosition + length) % this.stripeSize) == 0) {
      bytesInLastObject=this.stripeSize;
    }
 else {
      bytesInLastObject=(int)((filePosition + length) % this.stripeSize);
    }
  }
  int bytesWritten=0;
  for (int obj=firstObject; obj <= lastObject; obj++) {
    int bytesToWrite=this.stripeSize;
    int objOffset=0;
    if (obj == firstObject)     objOffset=offsetInFirstObject;
    if (obj == lastObject)     bytesToWrite=bytesInLastObject;
    ReusableBuffer view=ReusableBuffer.wrap(data,offset + bytesWritten,bytesToWrite);
    objectStore.writeObject(objOffset,obj,view);
    bytesWritten+=bytesToWrite;
  }
  return bytesWritten;
}

Fixed version (ground truth):
public int write(byte[] data,int offset,int length,long filePosition) throws Exception {
  final int firstObject=(int)(filePosition / this.stripeSize);
  int lastObject=(int)((filePosition + ((long)length)) / this.stripeSize);
  if (((filePosition + ((long)length)) % this.stripeSize) == 0)   lastObject--;
  final int offsetInFirstObject=(int)(filePosition % this.stripeSize);
  int bytesInLastObject=-1;
  if (firstObject == lastObject) {
    bytesInLastObject=length - offsetInFirstObject;
  }
 else {
    if (((filePosition + length) % this.stripeSize) == 0) {
      bytesInLastObject=this.stripeSize;
    }
 else {
      bytesInLastObject=(int)((filePosition + length) % this.stripeSize);
    }
  }
  int bytesWritten=0;
  for (int obj=firstObject; obj <= lastObject; obj++) {
    int bytesToWrite=this.stripeSize;
    int objOffset=0;
    if (obj == firstObject) {
      bytesToWrite=this.stripeSize - offsetInFirstObject;
      objOffset=offsetInFirstObject;
    }
    if (obj == lastObject)     bytesToWrite=bytesInLastObject;
    ReusableBuffer view=ReusableBuffer.wrap(data,offset + bytesWritten,bytesToWrite);
    objectStore.writeObject(objOffset,obj,view);
    bytesWritten+=bytesToWrite;
  }
  return bytesWritten;
}
Program: 113646
Project: 113646
Buggy source:
public RPCResponse<FileCredentials> open(InetSocketAddress server,UserCredentials credentials,String path,int flags,int mode,int w32attrs){
  openRequest rq=new openRequest(path,flags,w32attrs,mode);
  RPCResponse<FileCredentials> r=sendRequest(server,rq.getOperationNumber(),rq,new RPCResponseDecoder<FileCredentials>(){
    @Override public FileCredentials getResult(    ReusableBuffer data){
      final openResponse resp=new openResponse();
      resp.deserialize(data);
      return resp.getFile_credentials();
    }
  }
,credentials);
  return r;
}

Fixed version (ground truth):
public RPCResponse<FileCredentials> open(InetSocketAddress server,UserCredentials credentials,String path,int flags,int mode,int w32attrs){
  openRequest rq=new openRequest(path,flags,mode,w32attrs);
  RPCResponse<FileCredentials> r=sendRequest(server,rq.getOperationNumber(),rq,new RPCResponseDecoder<FileCredentials>(){
    @Override public FileCredentials getResult(    ReusableBuffer data){
      final openResponse resp=new openResponse();
      resp.deserialize(data);
      return resp.getFile_credentials();
    }
  }
,credentials);
  return r;
}
Program: 113647
Project: 113647
Buggy source:
public RPCResponse utime(InetSocketAddress server,UserCredentials credentials,String path,long atime,long ctime,long mtime){
  utimeRequest rq=new utimeRequest(path,atime,ctime,mtime);
  RPCResponse r=sendRequest(server,rq.getOperationNumber(),rq,new RPCResponseDecoder(){
    @Override public Object getResult(    ReusableBuffer data){
      final utimeResponse resp=new utimeResponse();
      resp.deserialize(data);
      return null;
    }
  }
,credentials);
  return r;
}

Fixed version (ground truth):
public RPCResponse utime(InetSocketAddress server,UserCredentials credentials,String path,long atime,long ctime,long mtime){
  utimensRequest rq=new utimensRequest(path,atime,ctime,mtime);
  RPCResponse r=sendRequest(server,rq.getOperationNumber(),rq,new RPCResponseDecoder(){
    @Override public Object getResult(    ReusableBuffer data){
      final utimensResponse resp=new utimensResponse();
      resp.deserialize(data);
      return null;
    }
  }
,credentials);
  return r;
}
Program: 113648
Project: 113648
Buggy source:
public RPCResponse xtreemfs_replica_remove(InetSocketAddress server,UserCredentials credentials,String fileId,String osdUUID){
  xtreemfs_replica_removeRequest rq=new xtreemfs_replica_removeRequest(fileId,osdUUID);
  RPCResponse r=sendRequest(server,rq.getOperationNumber(),rq,new RPCResponseDecoder(){
    @Override public Object getResult(    ReusableBuffer data){
      final xtreemfs_replica_addResponse resp=new xtreemfs_replica_addResponse();
      resp.deserialize(data);
      return null;
    }
  }
,credentials);
  return r;
}

Fixed version (ground truth):
public RPCResponse<XCap> xtreemfs_replica_remove(InetSocketAddress server,UserCredentials credentials,String fileId,String osdUUID){
  xtreemfs_replica_removeRequest rq=new xtreemfs_replica_removeRequest(fileId,osdUUID);
  RPCResponse<XCap> r=sendRequest(server,rq.getOperationNumber(),rq,new RPCResponseDecoder(){
    @Override public Object getResult(    ReusableBuffer data){
      final xtreemfs_replica_removeResponse resp=new xtreemfs_replica_removeResponse();
      resp.deserialize(data);
      return resp.getDelete_xcap();
    }
  }
,credentials);
  return r;
}
Program: 113650
Project: 113650
Buggy source:
public void run(){
  try {
    do {
      Logging.logMessage(Logging.LEVEL_DEBUG,this,"String_Node_Str");
      final String fileID=files.take();
      try {
        Logging.logMessage(Logging.LEVEL_DEBUG,this,"String_Node_Str" + fileID);
        layout.deleteFile(fileID);
      }
 catch (      IOException ex) {
        Logging.logMessage(Logging.LEVEL_ERROR,this,ex);
      }
    }
 while (!quit);
  }
 catch (  InterruptedException ex) {
  }
  Logging.logMessage(Logging.LEVEL_DEBUG,this,"String_Node_Str");
}

Fixed version (ground truth):
public void run(){
  try {
    do {
      Logging.logMessage(Logging.LEVEL_DEBUG,this,"String_Node_Str");
      final String fileID=files.take();
      try {
        if (Logging.isDebug())         Logging.logMessage(Logging.LEVEL_DEBUG,this,"String_Node_Str" + fileID);
        layout.deleteFile(fileID);
      }
 catch (      IOException ex) {
        Logging.logMessage(Logging.LEVEL_ERROR,this,ex);
      }
    }
 while (!quit);
  }
 catch (  InterruptedException ex) {
  }
  Logging.logMessage(Logging.LEVEL_DEBUG,this,"String_Node_Str");
}
Program: 113651
Project: 113651
Buggy source:
private void doCheckDeleteOnClose(StageRequest m){
  final String fileId=(String)m.getArgs()[0];
  final DeleteOnCloseCallback callback=(DeleteOnCloseCallback)m.getCallback();
  final boolean deleteOnClose=oft.contains(fileId);
  callback.deleteOnCloseResult(deleteOnClose,null);
}

Fixed version (ground truth):
private void doCheckDeleteOnClose(StageRequest m){
  final String fileId=(String)m.getArgs()[0];
  final DeleteOnCloseCallback callback=(DeleteOnCloseCallback)m.getCallback();
  final boolean deleteOnClose=oft.contains(fileId);
  if (deleteOnClose)   oft.setDeleteOnClose(fileId);
  callback.deleteOnCloseResult(deleteOnClose,null);
}
Program: 113652
Project: 113652
Buggy source:
public boolean isStriped(){
  return stripingPolicy.getWidth() > 1;
}

Fixed version (ground truth):
public boolean isStriped(){
  return getStripingPolicy().getWidth() > 1;
}
Program: 113658
Project: 113658
Buggy source:
@Override public String getXAttr(long fileId,String uid,String key) throws DatabaseException {
  try {
    byte[] prefix=BabuDBStorageHelper.createXAttrPrefixKey(fileId,uid,key);
    Iterator<Entry<byte[],byte[]>> it=database.directPrefixLookup(dbName,XATTRS_INDEX,prefix);
    while (it.hasNext()) {
      Entry<byte[],byte[]> curr=it.next();
      BufferBackedXAttr xattr=new BufferBackedXAttr(curr.getKey(),curr.getValue());
      if (uid.equals(xattr.getOwner()) && key.equals(xattr.getKey()))       return xattr.getValue();
    }
    return null;
  }
 catch (  BabuDBException exc) {
    throw new DatabaseException(exc);
  }
}

Fixed version (ground truth):
@Override public String getXAttr(long fileId,String uid,String key) throws DatabaseException {
  try {
    byte[] prefix=BabuDBStorageHelper.createXAttrPrefixKey(fileId,uid,key);
    Iterator<Entry<byte[],byte[]>> it=database.directPrefixLookup(dbName,XATTRS_INDEX,prefix);
    while (it.hasNext()) {
      Entry<byte[],byte[]> curr=it.next();
      BufferBackedXAttr xattr=new BufferBackedXAttr(curr.getKey(),curr.getValue());
      if (uid.equals(xattr.getOwner()) && key.equals(xattr.getKey()))       return xattr.getValue();
    }
    it=database.directPrefixLookup(dbName,XATTRS_INDEX,new byte[0]);
    while (it.hasNext())     System.out.println(Arrays.toString(it.next().getKey()));
    return null;
  }
 catch (  BabuDBException exc) {
    throw new DatabaseException(exc);
  }
}
Program: 113660
Project: 113660
Buggy source:
public void removeReplica(ServiceUUID osd) throws Exception {
  mrcClient.xtreemfs_replica_remove(mrcAddress,credentials,fileId,osd.toString());
  forceXCapUpdate();
}

Fixed version (ground truth):
public void removeReplica(ServiceUUID osd) throws Exception {
  RPCResponse r=mrcClient.xtreemfs_replica_remove(mrcAddress,credentials,fileId,osd.toString());
  r.get();
  r.freeBuffers();
  forceFileCredentialsUpdate(translateMode("String_Node_Str"));
}
Program: 113661
Project: 113661
Buggy source:
public void addReplica(List<ServiceUUID> osds,StripingPolicy spPolicy) throws Exception {
  if (isReadOnly) {
    StringSet osdSet=new StringSet();
    for (    ServiceUUID osd : osds) {
      osdSet.add(osd.toString());
    }
    org.xtreemfs.interfaces.Replica newReplica=new org.xtreemfs.interfaces.Replica(spPolicy,0,osdSet);
    mrcClient.xtreemfs_replica_add(mrcAddress,credentials,fileId,newReplica);
    forceXCapUpdate();
  }
 else   throw new IOException("String_Node_Str");
}

Fixed version (ground truth):
public void addReplica(List<ServiceUUID> osds,StripingPolicy spPolicy) throws Exception {
  XLocations xLoc=new XLocations(fileCredentials.getXlocs());
  if (osds.size() != spPolicy.getWidth())   throw new IllegalArgumentException("String_Node_Str");
  for (  ServiceUUID osd : osds) {
    if (xLoc.containsOSD(osd))     throw new IllegalArgumentException("String_Node_Str");
  }
  if (isReadOnly) {
    StringSet osdSet=new StringSet();
    for (    ServiceUUID osd : osds) {
      osdSet.add(osd.toString());
    }
    org.xtreemfs.interfaces.Replica newReplica=new org.xtreemfs.interfaces.Replica(spPolicy,0,osdSet);
    RPCResponse r=mrcClient.xtreemfs_replica_add(mrcAddress,credentials,fileId,newReplica);
    r.get();
    r.freeBuffers();
    forceFileCredentialsUpdate(translateMode("String_Node_Str"));
  }
 else   throw new IOException("String_Node_Str");
}
Program: 113662
Project: 113662
Buggy source:
@Override public void startRequest(MRCRequest rq){
  try {
    final xtreemfs_get_suitable_osdsRequest rqArgs=(xtreemfs_get_suitable_osdsRequest)rq.getRequestArgs();
    String volumeId=null;
    try {
      String globalFileId=rqArgs.getFile_id();
      int i=globalFileId.indexOf(':');
      volumeId=globalFileId.substring(0,i);
    }
 catch (    Exception exc) {
      throw new UserException("String_Node_Str" + rqArgs.getFile_id() + "String_Node_Str");
    }
    ServiceSet usableOSDs=master.getOSDStatusManager().getUsableOSDs(volumeId);
    StringSet uuids=new StringSet();
    for (int i=0; i < usableOSDs.calculateSize(); i++)     uuids.add(usableOSDs.get(i).getUuid());
    rq.setResponse(new xtreemfs_get_suitable_osdsResponse(uuids));
    finishRequest(rq);
  }
 catch (  UserException exc) {
    Logging.logMessage(Logging.LEVEL_TRACE,this,exc);
    finishRequest(rq,new ErrorRecord(ErrorClass.USER_EXCEPTION,exc.getErrno(),exc.getMessage(),exc));
  }
catch (  Throwable exc) {
    finishRequest(rq,new ErrorRecord(ErrorClass.INTERNAL_SERVER_ERROR,"String_Node_Str",exc));
  }
}

Fixed version (ground truth):
@Override public void startRequest(MRCRequest rq){
  try {
    final xtreemfs_get_suitable_osdsRequest rqArgs=(xtreemfs_get_suitable_osdsRequest)rq.getRequestArgs();
    String volumeId=null;
    try {
      String globalFileId=rqArgs.getFile_id();
      int i=globalFileId.indexOf(':');
      volumeId=globalFileId.substring(0,i);
    }
 catch (    Exception exc) {
      throw new UserException("String_Node_Str" + rqArgs.getFile_id() + "String_Node_Str");
    }
    ServiceSet usableOSDs=master.getOSDStatusManager().getUsableOSDs(volumeId);
    StringSet uuids=new StringSet();
    for (int i=0; i < usableOSDs.size(); i++)     uuids.add(usableOSDs.get(i).getUuid());
    rq.setResponse(new xtreemfs_get_suitable_osdsResponse(uuids));
    finishRequest(rq);
  }
 catch (  UserException exc) {
    Logging.logMessage(Logging.LEVEL_TRACE,this,exc);
    finishRequest(rq,new ErrorRecord(ErrorClass.USER_EXCEPTION,exc.getErrno(),exc.getMessage(),exc));
  }
catch (  Throwable exc) {
    finishRequest(rq,new ErrorRecord(ErrorClass.INTERNAL_SERVER_ERROR,"String_Node_Str",exc));
  }
}
Program: 113663
Project: 113663
Buggy source:
public void setUp() throws Exception {
  System.out.println("String_Node_Str" + getClass().getSimpleName() + "String_Node_Str"+ getName());
  testEnv=new TestEnvironment(new TestEnvironment.Services[]{TestEnvironment.Services.DIR_CLIENT,TestEnvironment.Services.MRC_CLIENT,TestEnvironment.Services.TIME_SYNC,TestEnvironment.Services.UUID_RESOLVER,TestEnvironment.Services.DIR_SERVICE});
  testEnv.start();
  dsCfg=SetupUtils.createDIRConfig();
  mrcCfg1=SetupUtils.createMRC1Config();
  mrc1Address=SetupUtils.getMRC1Addr();
  osdConfig1=SetupUtils.createOSD1Config();
  osdConfig2=SetupUtils.createOSD2Config();
  File testDir=new File(SetupUtils.TEST_DIR);
  FSUtils.delTree(testDir);
  testDir.mkdirs();
  osd1=new OSD(osdConfig1);
  osd2=new OSD(osdConfig2);
  mrc1=new MRCRequestDispatcher(mrcCfg1);
  mrc1.startup();
  volumeName="String_Node_Str";
  RPCResponse r=testEnv.getMrcClient().mkvol(mrc1Address,uc,volumeName,Constants.OSD_SELECTION_POLICY_SIMPLE,new StripingPolicy(Constants.STRIPING_POLICY_RAID0,64,1),Constants.ACCESS_CONTROL_POLICY_NULL,0);
  r.get();
  r=testEnv.getMrcClient().mkdir(mrc1Address,uc,volumeName + "String_Node_Str",0);
  r.get();
  for (int i=0; i < 10; i++) {
    r=testEnv.getMrcClient().create(mrc1Address,uc,volumeName + "String_Node_Str" + i+ "String_Node_Str",0);
    r.get();
  }
}

Fixed version (ground truth):
public void setUp() throws Exception {
  System.out.println("String_Node_Str" + getClass().getSimpleName() + "String_Node_Str"+ getName());
  testEnv=new TestEnvironment(new TestEnvironment.Services[]{TestEnvironment.Services.DIR_CLIENT,TestEnvironment.Services.MRC_CLIENT,TestEnvironment.Services.TIME_SYNC,TestEnvironment.Services.UUID_RESOLVER,TestEnvironment.Services.DIR_SERVICE});
  testEnv.start();
  dsCfg=SetupUtils.createDIRConfig();
  mrcCfg1=SetupUtils.createMRC1Config();
  mrc1Address=SetupUtils.getMRC1Addr();
  osdConfig1=SetupUtils.createOSD1Config();
  osdConfig2=SetupUtils.createOSD2Config();
  osdConfig3=SetupUtils.createOSD3Config();
  osdConfig4=SetupUtils.createOSD4Config();
  File testDir=new File(SetupUtils.TEST_DIR);
  FSUtils.delTree(testDir);
  testDir.mkdirs();
  osd1=new OSD(osdConfig1);
  osd2=new OSD(osdConfig2);
  osd3=new OSD(osdConfig3);
  osd4=new OSD(osdConfig4);
  mrc1=new MRCRequestDispatcher(mrcCfg1);
  mrc1.startup();
  volumeName="String_Node_Str";
  RPCResponse r=testEnv.getMrcClient().mkvol(mrc1Address,uc,volumeName,Constants.OSD_SELECTION_POLICY_SIMPLE,new StripingPolicy(Constants.STRIPING_POLICY_RAID0,64,1),Constants.ACCESS_CONTROL_POLICY_NULL,0);
  r.get();
  r=testEnv.getMrcClient().mkdir(mrc1Address,uc,volumeName + "String_Node_Str",0);
  r.get();
  for (int i=0; i < 10; i++) {
    r=testEnv.getMrcClient().create(mrc1Address,uc,volumeName + "String_Node_Str" + i+ "String_Node_Str",0);
    r.get();
  }
}
Program: 113665
Project: 113665
Buggy source:
public void tearDown() throws Exception {
  mrc1.shutdown();
  osd1.shutdown();
  osd2.shutdown();
  testEnv.shutdown();
  Logging.logMessage(Logging.LEVEL_DEBUG,this,BufferPool.getStatus());
}

Fixed version (ground truth):
public void tearDown() throws Exception {
  mrc1.shutdown();
  osd1.shutdown();
  osd2.shutdown();
  osd3.shutdown();
  osd4.shutdown();
  testEnv.shutdown();
  Logging.logMessage(Logging.LEVEL_DEBUG,this,BufferPool.getStatus());
}
Program: 113666
Project: 113666
Buggy source:
public ChannelIO(SocketChannel channel){
  super();
  this.channel=channel;
  this.certs=null;
  attachment=null;
}

Fixed version (ground truth):
public ChannelIO(SocketChannel channel){
  this.channel=channel;
  this.certs=null;
  attachment=null;
}
Program: 113668
Project: 113668
Buggy source:
/** 
 * {@inheritDoc}
 */
@Override public int read(ByteBuffer dst) throws IOException {
  int returnValue=0;
  if (!shutdownInProgress) {
    if (handshakeComplete) {
      if (inReadBuffer.remaining() == inReadBuffer.capacity()) {
        if (channel.read(inNetBuffer.getBuffer()) == -1) {
          throw new IOException("String_Node_Str");
        }
        inNetBuffer.flip();
        inDataAvail:         while (inNetBuffer.hasRemaining()) {
          SSLEngineResult result=sslEngine.unwrap(inNetBuffer.getBuffer(),inReadBuffer.getBuffer());
switch (result.getStatus()) {
case OK:
{
              if (sslEngine.isInboundDone()) {
                close();
              }
              break;
            }
case BUFFER_UNDERFLOW:
{
            inNetBuffer.compact();
            break inDataAvail;
          }
case BUFFER_OVERFLOW:
{
          throw new IOException("String_Node_Str");
        }
case CLOSED:
{
        throw new IOException("String_Node_Str");
      }
default :
{
      throw new IOException("String_Node_Str");
    }
}
}
inNetBuffer.compact();
}
inReadBuffer.flip();
while (inReadBuffer.hasRemaining() && dst.hasRemaining()) {
dst.put(inReadBuffer.get());
returnValue++;
}
inReadBuffer.compact();
}
}
return returnValue;
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public int read(ByteBuffer dst) throws IOException {
  int returnValue=0;
  if (!shutdownInProgress) {
    if (handshakeComplete) {
      if (inReadBuffer.remaining() == inReadBuffer.capacity()) {
        if (channel.read(inNetBuffer.getBuffer()) == -1) {
          return -1;
        }
        inNetBuffer.flip();
        inDataAvail:         while (inNetBuffer.hasRemaining()) {
          SSLEngineResult result=sslEngine.unwrap(inNetBuffer.getBuffer(),inReadBuffer.getBuffer());
switch (result.getStatus()) {
case OK:
{
              if (sslEngine.isInboundDone()) {
                close();
              }
              break;
            }
case BUFFER_UNDERFLOW:
{
            break inDataAvail;
          }
case BUFFER_OVERFLOW:
{
          throw new IOException("String_Node_Str");
        }
case CLOSED:
{
        throw new IOException("String_Node_Str");
      }
default :
{
      throw new IOException("String_Node_Str");
    }
}
}
inNetBuffer.compact();
}
inReadBuffer.flip();
while (inReadBuffer.hasRemaining() && dst.hasRemaining()) {
dst.put(inReadBuffer.get());
returnValue++;
}
inReadBuffer.compact();
}
}
return returnValue;
}
Program: 113671
Project: 113671
Buggy source:
public void serialize(ONCRPCBufferWriter writer){
  write_cap.serialize(writer);
}

Fixed version (ground truth):
public void serialize(ONCRPCBufferWriter writer){
  write_xcap.serialize(writer);
}
Program: 113672
Project: 113672
Buggy source:
public ftruncateRequest(Object[] from_array){
  write_cap=new XCap();
  this.deserialize(from_array);
}

Fixed version (ground truth):
public ftruncateRequest(Object[] from_array){
  write_xcap=new XCap();
  this.deserialize(from_array);
}
Program: 113673
Project: 113673
Buggy source:
public String toString(){
  return "String_Node_Str" + write_cap.toString() + "String_Node_Str";
}

Fixed version (ground truth):
public String toString(){
  return "String_Node_Str" + write_xcap.toString() + "String_Node_Str";
}
Program: 113674
Project: 113674
Buggy source:
public void deserialize(ReusableBuffer buf){
  write_cap=new XCap();
  write_cap.deserialize(buf);
}

Fixed version (ground truth):
public void deserialize(ReusableBuffer buf){
  write_xcap=new XCap();
  write_xcap.deserialize(buf);
}
Program: 113675
Project: 113675
Buggy source:
public int calculateSize(){
  int my_size=0;
  my_size+=write_cap.calculateSize();
  return my_size;
}

Fixed version (ground truth):
public int calculateSize(){
  int my_size=0;
  my_size+=write_xcap.calculateSize();
  return my_size;
}
Program: 113676
Project: 113676
Buggy source:
public void serialize(ONCRPCBufferWriter writer){
  truncate_cap.serialize(writer);
}

Fixed version (ground truth):
public void serialize(ONCRPCBufferWriter writer){
  truncate_xcap.serialize(writer);
}
Program: 113677
Project: 113677
Buggy source:
public ftruncateResponse(Object[] from_array){
  truncate_cap=new XCap();
  this.deserialize(from_array);
}

Fixed version (ground truth):
public ftruncateResponse(Object[] from_array){
  truncate_xcap=new XCap();
  this.deserialize(from_array);
}
Program: 113678
Project: 113678
Buggy source:
public String toString(){
  return "String_Node_Str" + truncate_cap.toString() + "String_Node_Str";
}

Fixed version (ground truth):
public String toString(){
  return "String_Node_Str" + truncate_xcap.toString() + "String_Node_Str";
}
Program: 113679
Project: 113679
Buggy source:
public void deserialize(ReusableBuffer buf){
  truncate_cap=new XCap();
  truncate_cap.deserialize(buf);
}

Fixed version (ground truth):
public void deserialize(ReusableBuffer buf){
  truncate_xcap=new XCap();
  truncate_xcap.deserialize(buf);
}
Program: 113680
Project: 113680
Buggy source:
public int calculateSize(){
  int my_size=0;
  my_size+=truncate_cap.calculateSize();
  return my_size;
}

Fixed version (ground truth):
public int calculateSize(){
  int my_size=0;
  my_size+=truncate_xcap.calculateSize();
  return my_size;
}
Program: 113681
Project: 113681
Buggy source:
public void serialize(ONCRPCBufferWriter writer){
  org.xtreemfs.interfaces.utils.XDRUtils.serializeString(returnValue,writer);
}

Fixed version (ground truth):
public void serialize(ONCRPCBufferWriter writer){
  org.xtreemfs.interfaces.utils.XDRUtils.serializeString(value,writer);
}
Program: 113682
Project: 113682
Buggy source:
public getxattrResponse(Object[] from_array){
  returnValue="String_Node_Str";
  this.deserialize(from_array);
}

Fixed version (ground truth):
public getxattrResponse(Object[] from_array){
  value="String_Node_Str";
  this.deserialize(from_array);
}
Program: 113683
Project: 113683
Buggy source:
public String toString(){
  return "String_Node_Str" + "String_Node_Str" + returnValue + "String_Node_Str"+ "String_Node_Str";
}

Fixed version (ground truth):
public String toString(){
  return "String_Node_Str" + "String_Node_Str" + value + "String_Node_Str"+ "String_Node_Str";
}
Program: 113684
Project: 113684
Buggy source:
public void deserialize(ReusableBuffer buf){
  returnValue=org.xtreemfs.interfaces.utils.XDRUtils.deserializeString(buf);
}

Fixed version (ground truth):
public void deserialize(ReusableBuffer buf){
  value=org.xtreemfs.interfaces.utils.XDRUtils.deserializeString(buf);
}
Program: 113685
Project: 113685
Buggy source:
public int calculateSize(){
  int my_size=0;
  my_size+=org.xtreemfs.interfaces.utils.XDRUtils.stringLengthPadded(returnValue);
  return my_size;
}

Fixed version (ground truth):
public int calculateSize(){
  int my_size=0;
  my_size+=org.xtreemfs.interfaces.utils.XDRUtils.stringLengthPadded(value);
  return my_size;
}
Program: 113686
Project: 113686
Buggy source:
public readResponse(Object[] from_array){
  returnValue=new ObjectData();
  this.deserialize(from_array);
}

Fixed version (ground truth):
public readResponse(Object[] from_array){
  object_data=new ObjectData();
  this.deserialize(from_array);
}
Program: 113687
Project: 113687
Buggy source:
public void serialize(ONCRPCBufferWriter writer){
  returnValue.serialize(writer);
}

Fixed version (ground truth):
public void serialize(ONCRPCBufferWriter writer){
  object_data.serialize(writer);
}
Program: 113688
Project: 113688
Buggy source:
public String toString(){
  return "String_Node_Str" + returnValue.toString() + "String_Node_Str";
}

Fixed version (ground truth):
public String toString(){
  return "String_Node_Str" + object_data.toString() + "String_Node_Str";
}
Program: 113689
Project: 113689
Buggy source:
public void deserialize(ReusableBuffer buf){
  returnValue=new ObjectData();
  returnValue.deserialize(buf);
}

Fixed version (ground truth):
public void deserialize(ReusableBuffer buf){
  object_data=new ObjectData();
  object_data.deserialize(buf);
}
Program: 113690
Project: 113690
Buggy source:
public int calculateSize(){
  int my_size=0;
  my_size+=returnValue.calculateSize();
  return my_size;
}

Fixed version (ground truth):
public int calculateSize(){
  int my_size=0;
  my_size+=object_data.calculateSize();
  return my_size;
}
Program: 113694
Project: 113694
Buggy source:
@Override public void startRequest(MRCRequest rq){
  try {
    final accessRequest rqArgs=(accessRequest)rq.getRequestArgs();
    final VolumeManager vMan=master.getVolumeManager();
    final FileAccessManager faMan=master.getFileAccessManager();
    validateContext(rq);
    final Path p=new Path(rqArgs.getPath());
    final VolumeInfo volume=vMan.getVolumeByName(p.getComp(0));
    final StorageManager sMan=vMan.getStorageManager(volume.getId());
    final PathResolver res=new PathResolver(sMan,p);
    faMan.checkSearchPermission(sMan,res,rq.getDetails().userId,rq.getDetails().superUser,rq.getDetails().groupIds);
    res.checkIfFileDoesNotExist();
    FileMetadata file=res.getFile();
    boolean success=false;
    try {
      faMan.checkPermission(rqArgs.getMode(),sMan,file,res.getParentDirId(),rq.getDetails().userId,rq.getDetails().superUser,rq.getDetails().groupIds);
      success=true;
    }
 catch (    UserException exc) {
    }
    rq.setResponse(new accessResponse(success));
    finishRequest(rq);
  }
 catch (  UserException exc) {
    Logging.logMessage(Logging.LEVEL_TRACE,this,exc);
    finishRequest(rq,new ErrorRecord(ErrorClass.USER_EXCEPTION,exc.getErrno(),exc.getMessage(),exc));
  }
catch (  Exception exc) {
    finishRequest(rq,new ErrorRecord(ErrorClass.INTERNAL_SERVER_ERROR,"String_Node_Str",exc));
  }
}

Fixed version (ground truth):
@Override public void startRequest(MRCRequest rq){
  try {
    final accessRequest rqArgs=(accessRequest)rq.getRequestArgs();
    final VolumeManager vMan=master.getVolumeManager();
    final FileAccessManager faMan=master.getFileAccessManager();
    validateContext(rq);
    final Path p=new Path(rqArgs.getPath());
    final VolumeInfo volume=vMan.getVolumeByName(p.getComp(0));
    final StorageManager sMan=vMan.getStorageManager(volume.getId());
    final PathResolver res=new PathResolver(sMan,p);
    faMan.checkSearchPermission(sMan,res,rq.getDetails().userId,rq.getDetails().superUser,rq.getDetails().groupIds);
    res.checkIfFileDoesNotExist();
    FileMetadata file=res.getFile();
    boolean success=false;
    try {
      faMan.checkPermission(rqArgs.getMode(),sMan,file,res.getParentDirId(),rq.getDetails().userId,rq.getDetails().superUser,rq.getDetails().groupIds);
      success=true;
    }
 catch (    UserException exc) {
    }
    rq.setResponse(new accessResponse(success));
    finishRequest(rq);
  }
 catch (  UserException exc) {
    Logging.logMessage(Logging.LEVEL_TRACE,this,exc);
    finishRequest(rq,new ErrorRecord(ErrorClass.USER_EXCEPTION,exc.getErrno(),exc.getMessage(),exc));
  }
catch (  Throwable exc) {
    finishRequest(rq,new ErrorRecord(ErrorClass.INTERNAL_SERVER_ERROR,"String_Node_Str",exc));
  }
}
Program: 113695
Project: 113695
Buggy source:
@Override public void startRequest(MRCRequest rq){
  try {
    final xtreemfs_check_file_existsRequest rqArgs=(xtreemfs_check_file_existsRequest)rq.getRequestArgs();
    final VolumeManager vMan=master.getVolumeManager();
    StorageManager sMan=vMan.getStorageManager(rqArgs.getVolume_id());
    String response=sMan == null ? "String_Node_Str" : "String_Node_Str";
    if (sMan != null)     try {
      if (rqArgs.getFile_ids().size() == 0)       throw new UserException("String_Node_Str");
      for (      String fileId : rqArgs.getFile_ids()) {
        if (fileId == null)         throw new MRCException("String_Node_Str");
        response+=sMan.getMetadata(Long.parseLong(fileId)) != null ? "String_Node_Str" : "String_Node_Str";
      }
    }
 catch (    UserException ue) {
      response="String_Node_Str";
    }
catch (    MRCException be) {
      throw new MRCException("String_Node_Str" + be.getMessage());
    }
    rq.setResponse(new xtreemfs_check_file_existsResponse(response));
    finishRequest(rq);
  }
 catch (  Exception exc) {
    finishRequest(rq,new ErrorRecord(ErrorClass.INTERNAL_SERVER_ERROR,"String_Node_Str",exc));
  }
}

Fixed version (ground truth):
@Override public void startRequest(MRCRequest rq){
  try {
    final xtreemfs_check_file_existsRequest rqArgs=(xtreemfs_check_file_existsRequest)rq.getRequestArgs();
    final VolumeManager vMan=master.getVolumeManager();
    StorageManager sMan=vMan.getStorageManager(rqArgs.getVolume_id());
    String response=sMan == null ? "String_Node_Str" : "String_Node_Str";
    if (sMan != null)     try {
      if (rqArgs.getFile_ids().size() == 0)       throw new UserException("String_Node_Str");
      for (      String fileId : rqArgs.getFile_ids()) {
        if (fileId == null)         throw new MRCException("String_Node_Str");
        response+=sMan.getMetadata(Long.parseLong(fileId)) != null ? "String_Node_Str" : "String_Node_Str";
      }
    }
 catch (    UserException ue) {
      response="String_Node_Str";
    }
catch (    MRCException be) {
      throw new MRCException("String_Node_Str" + be.getMessage());
    }
    rq.setResponse(new xtreemfs_check_file_existsResponse(response));
    finishRequest(rq);
  }
 catch (  Throwable exc) {
    finishRequest(rq,new ErrorRecord(ErrorClass.INTERNAL_SERVER_ERROR,"String_Node_Str",exc));
  }
}
Program: 113696
Project: 113696
Buggy source:
@Override public void startRequest(MRCRequest rq){
  try {
    master.getVolumeManager().checkpointDB();
    rq.setResponse(new xtreemfs_checkpointResponse());
    finishRequest(rq);
  }
 catch (  Exception ex) {
    Logging.logMessage(Logging.LEVEL_ERROR,this,ex);
    master.requestFailed(rq,ex);
  }
}

Fixed version (ground truth):
@Override public void startRequest(MRCRequest rq){
  try {
    master.getVolumeManager().checkpointDB();
    rq.setResponse(new xtreemfs_checkpointResponse());
    finishRequest(rq);
  }
 catch (  Throwable exc) {
    finishRequest(rq,new ErrorRecord(ErrorClass.INTERNAL_SERVER_ERROR,"String_Node_Str",exc));
  }
}