Program: 113582
Project: 113582
Buggy source:
@Override public void startRequest(MRCRequest rq) throws Throwable {
  final chownRequest rqArgs=(chownRequest)rq.getRequestArgs();
  final VolumeManager vMan=master.getVolumeManager();
  final FileAccessManager faMan=master.getFileAccessManager();
  validateContext(rq);
  Path p=new Path(rqArgs.getPath());
  StorageManager sMan=vMan.getStorageManagerByName(p.getComp(0));
  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;
    }
    sMan=vMan.getStorageManagerByName(p.getComp(0));
    res=new PathResolver(sMan,p);
    file=res.getFile();
  }
  if (!rqArgs.getUser_id().equals("String_Node_Str")) {
    if (!rq.getDetails().superUser)     throw new UserException(ErrNo.EACCES,"String_Node_Str");
  }
 else {
    faMan.checkPrivilegedPermissions(sMan,file,rq.getDetails().userId,rq.getDetails().superUser,rq.getDetails().groupIds);
    if (!(rq.getDetails().superUser || rq.getDetails().groupIds.contains(rqArgs.getGroup_id())))     throw new UserException(ErrNo.EACCES,"String_Node_Str");
  }
  AtomicDBUpdate update=sMan.createAtomicDBUpdate(master,rq);
  file.setOwnerAndGroup(rqArgs.getUser_id().equals("String_Node_Str") ? file.getOwnerId() : rqArgs.getUser_id(),rqArgs.getGroup_id().equals("String_Node_Str") ? file.getOwningGroupId() : rqArgs.getGroup_id());
  sMan.setMetadata(file,FileMetadata.RC_METADATA,update);
  MRCHelper.updateFileTimes(res.getParentDirId(),file,false,true,false,sMan,update);
  rq.setResponse(new chownResponse());
  update.execute();
}

Fixed version (ground truth):
@Override public void startRequest(MRCRequest rq) throws Throwable {
  final chownRequest rqArgs=(chownRequest)rq.getRequestArgs();
  final VolumeManager vMan=master.getVolumeManager();
  final FileAccessManager faMan=master.getFileAccessManager();
  validateContext(rq);
  Path p=new Path(rqArgs.getPath());
  StorageManager sMan=vMan.getStorageManagerByName(p.getComp(0));
  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;
    }
    sMan=vMan.getStorageManagerByName(p.getComp(0));
    res=new PathResolver(sMan,p);
    file=res.getFile();
  }
  if (!rqArgs.getUser_id().equals("String_Node_Str")) {
    if (!rq.getDetails().superUser)     throw new UserException(ErrNo.EPERM,"String_Node_Str");
  }
 else {
    faMan.checkPrivilegedPermissions(sMan,file,rq.getDetails().userId,rq.getDetails().superUser,rq.getDetails().groupIds);
    if (!(rq.getDetails().superUser || rq.getDetails().groupIds.contains(rqArgs.getGroup_id())))     throw new UserException(ErrNo.EPERM,"String_Node_Str");
  }
  AtomicDBUpdate update=sMan.createAtomicDBUpdate(master,rq);
  file.setOwnerAndGroup(rqArgs.getUser_id().equals("String_Node_Str") ? file.getOwnerId() : rqArgs.getUser_id(),rqArgs.getGroup_id().equals("String_Node_Str") ? file.getOwningGroupId() : rqArgs.getGroup_id());
  sMan.setMetadata(file,FileMetadata.RC_METADATA,update);
  MRCHelper.updateFileTimes(res.getParentDirId(),file,false,true,false,sMan,update);
  rq.setResponse(new chownResponse());
  update.execute();
}