Program: 113336
Project: 113336
Buggy source:
/** 
 * Transfers the space information (used & blocked) for a file to the new owner group
 * @param quotaFileInformation
 * @param newOwnerGroupId
 * @param filesize
 * @param blockedSpace
 * @param update
 * @throws UserException
 */
@SuppressWarnings("String_Node_Str") public synchronized void transferOwnerGroupSpace(QuotaFileInformation quotaFileInformation,String newOwnerGroupId,long filesize,long blockedSpace,AtomicDBUpdate update) throws UserException {
  Logging.logMessage(Logging.LEVEL_DEBUG,this,"String_Node_Str" + volumeId + "String_Node_Str");
  QuotaFileInformation newQuotaFileInformation=new QuotaFileInformation(quotaFileInformation);
  newQuotaFileInformation.setOwnerGroupId(newOwnerGroupId);
  QuotaInformation quotaInformationOldOwnerGroup=getAndApplyQuotaInformation(quotaFileInformation,true,update);
  QuotaInformation quotaInformationNewOwnerGroup=getAndApplyQuotaInformation(newQuotaFileInformation,true,update);
  if (QuotaConstants.checkQuotaOnChown && quotaInformationNewOwnerGroup.getFreeSpace() < (filesize + blockedSpace)) {
    throw new UserException(POSIXErrno.POSIX_ERROR_ENOSPC,"String_Node_Str" + quotaInformationNewOwnerGroup.getQuotaType() + "String_Node_Str");
  }
  updateGroupSpaceUsage(quotaFileInformation,quotaInformationOldOwnerGroup,-1 * filesize,-1 * blockedSpace,update);
  updateGroupSpaceUsage(newQuotaFileInformation,quotaInformationNewOwnerGroup,filesize,blockedSpace,update);
}

Fixed version (ground truth):
/** 
 * Transfers the space information (used & blocked) for a file to the new owner group
 * @param quotaFileInformation
 * @param newOwnerGroupId
 * @param filesize
 * @param blockedSpace
 * @param update
 * @throws UserException
 */
public synchronized void transferOwnerGroupSpace(QuotaFileInformation quotaFileInformation,String newOwnerGroupId,long filesize,long blockedSpace,AtomicDBUpdate update) throws UserException {
  Logging.logMessage(Logging.LEVEL_DEBUG,this,"String_Node_Str" + volumeId + "String_Node_Str");
  QuotaFileInformation newQuotaFileInformation=new QuotaFileInformation(quotaFileInformation);
  newQuotaFileInformation.setOwnerGroupId(newOwnerGroupId);
  QuotaInformation quotaInformationOldOwnerGroup=getAndApplyGroupQuotaInformation(null,quotaFileInformation,true,update);
  QuotaInformation quotaInformationNewOwnerGroup=getAndApplyGroupQuotaInformation(null,newQuotaFileInformation,true,update);
  System.out.println("String_Node_Str" + quotaFileInformation.getOwnerId());
  System.out.println("String_Node_Str" + quotaFileInformation.getOwnerGroupId() + "String_Node_Str"+ newOwnerGroupId);
  System.out.println("String_Node_Str" + quotaInformationNewOwnerGroup.getFreeSpace() + "String_Node_Str"+ filesize+ "String_Node_Str"+ blockedSpace);
  if (QuotaConstants.checkQuotaOnChown && quotaInformationNewOwnerGroup.getFreeSpace() < (filesize + blockedSpace)) {
    throw new UserException(POSIXErrno.POSIX_ERROR_ENOSPC,"String_Node_Str" + quotaInformationNewOwnerGroup.getQuotaType() + "String_Node_Str");
  }
  updateGroupSpaceUsage(quotaFileInformation,quotaInformationOldOwnerGroup,-1 * filesize,-1 * blockedSpace,update);
  updateGroupSpaceUsage(newQuotaFileInformation,quotaInformationNewOwnerGroup,filesize,blockedSpace,update);
}