Program: 113720
Project: 113720
Buggy source:
@Override public void startRequest(MRCRequest rq){
  try {
    final setxattrRequest rqArgs=(setxattrRequest)rq.getRequestArgs();
    final VolumeManager vMan=master.getVolumeManager();
    final FileAccessManager faMan=master.getFileAccessManager();
    validateContext(rq);
    Path p=new Path(rqArgs.getPath());
    VolumeInfo volume=vMan.getVolumeByName(p.getComp(0));
    StorageManager sMan=vMan.getStorageManager(volume.getId());
    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();
    String target=sMan.getSoftlinkTarget(file.getId());
    if (target != null) {
      rqArgs.setPath(target);
      p=new Path(target);
      if (!vMan.hasVolume(p.getComp(0))) {
        finishRequest(rq,new ErrorRecord(ErrorClass.USER_EXCEPTION,ErrNo.ENOENT,"String_Node_Str" + target + "String_Node_Str"));
        return;
      }
      volume=vMan.getVolumeByName(p.getComp(0));
      sMan=vMan.getStorageManager(volume.getId());
      res=new PathResolver(sMan,p);
      file=res.getFile();
    }
    AtomicDBUpdate update=sMan.createAtomicDBUpdate(master,rq);
    final String attrKey=rqArgs.getName();
    final String attrVal=rqArgs.getValue();
    if (attrKey.startsWith("String_Node_Str")) {
      faMan.checkPrivilegedPermissions(sMan,file,rq.getDetails().userId,rq.getDetails().superUser,rq.getDetails().groupIds);
      MRCHelper.setSysAttrValue(sMan,vMan,volume,res.getParentDirId(),file,attrKey.substring(9),attrVal,update);
    }
 else {
      sMan.setXAttr(file.getId(),rq.getDetails().userId,attrKey,attrVal.length() == 0 ? null : attrVal,update);
    }
    MRCHelper.updateFileTimes(res.getParentDirId(),file,false,true,false,sMan,update);
    rq.setResponse(new setxattrResponse());
    update.execute();
  }
 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 setxattrRequest rqArgs=(setxattrRequest)rq.getRequestArgs();
    final VolumeManager vMan=master.getVolumeManager();
    final FileAccessManager faMan=master.getFileAccessManager();
    validateContext(rq);
    Path p=new Path(rqArgs.getPath());
    VolumeInfo volume=vMan.getVolumeByName(p.getComp(0));
    StorageManager sMan=vMan.getStorageManager(volume.getId());
    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();
    String target=sMan.getSoftlinkTarget(file.getId());
    if (target != null) {
      rqArgs.setPath(target);
      p=new Path(target);
      if (!vMan.hasVolume(p.getComp(0))) {
        finishRequest(rq,new ErrorRecord(ErrorClass.USER_EXCEPTION,ErrNo.ENOENT,"String_Node_Str" + target + "String_Node_Str"));
        return;
      }
      volume=vMan.getVolumeByName(p.getComp(0));
      sMan=vMan.getStorageManager(volume.getId());
      res=new PathResolver(sMan,p);
      file=res.getFile();
    }
    AtomicDBUpdate update=sMan.createAtomicDBUpdate(master,rq);
    final String attrKey=rqArgs.getName();
    final String attrVal=rqArgs.getValue();
    if (attrKey.startsWith("String_Node_Str")) {
      faMan.checkPrivilegedPermissions(sMan,file,rq.getDetails().userId,rq.getDetails().superUser,rq.getDetails().groupIds);
      MRCHelper.setSysAttrValue(sMan,vMan,volume,res.getParentDirId(),file,attrKey.substring(9),attrVal,update);
    }
 else {
      sMan.setXAttr(file.getId(),rq.getDetails().userId,attrKey,attrVal.length() == 0 ? null : attrVal,update);
    }
    MRCHelper.updateFileTimes(res.getParentDirId(),file,false,true,false,sMan,update);
    rq.setResponse(new setxattrResponse());
    update.execute();
  }
 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));
  }
}