Buggy code:
public class UpdateVmCommand < T extends VmManagementParametersBase > extends VmManagementCommandBase < T > implements RenamedEntityInfoProvider , QuotaVdsDependent { private static final Base64 BASE_64 = new Base64 ( 0 , null ) ; @ Inject private ProviderDao providerDao ; private VM oldVm ; private boolean quotaSanityOnly = false ; private VmStatic newVmStatic ; private VdcReturnValueBase setNumberOfCpusResult ; private List < GraphicsDevice > cachedGraphics ; private boolean isUpdateVmTemplateVersion = false ; public UpdateVmCommand ( T parameters ) { } public UpdateVmCommand ( T parameters , CommandContext commandContext ) { } private VmPropertiesUtils getVmPropertiesUtils ( ) { } @ Override protected LockProperties applyLockProperties ( LockProperties lockProperties ) { } @ Override public AuditLogType getAuditLogTypeValue ( ) { } @ Override protected void executeVmCommand ( ) { } private void updateVmHostDevices ( ) { } private void updateVmTemplateVersion ( ) { } private boolean updateRngDevice ( ) { } private void createNextRunSnapshot ( ) { } private void hotSetCpus ( int cpuPerSocket , int newNumOfSockets , int newThreadsPerCpu ) { } private void hotSetMemory ( int newAmountOfMemory ) { } private void auditLogHotSetCpusCandos ( HotSetNumberOfCpusParameters params ) { } private void auditLogHotSetMemCandos ( HotSetAmountOfMemoryParameters params , VdcReturnValueBase setAmountOfMemoryResult ) { if ( ! ( setAmountOfMemoryResult . getCanDoAction ( ) ) ) { AuditLogableBase logable = new HotSetAmountOfMemoryCommand ( params ) ; List < String > canDos = UpdateVmCommand . getBackend ( ) . getErrorsTranslator ( ) . TranslateErrorText ( setAmountOfMemoryResult . getCanDoActionMessages ( ) ) ; logable . addCustomValue ( LOGABLE_FIELD_ERROR_MESSAGE , StringUtils . join ( canDos , "," ) ) ; <START_BUG> auditLogDirector . log ( logable , FAILED_HOT_SET_NUMBER_OF_CPUS ) ; <END_BUG> } } private void checkTrustedService ( ) { } private void updateWatchdog ( ) { } private void updateGraphicsDevices ( ) { } private void updateGraphicsDevice ( GraphicsType type ) { } private GraphicsDevice getGraphicsDevOfType ( GraphicsType type ) { } private List < GraphicsDevice > getGraphicsDevices ( ) { } protected void updateVmPayload ( ) { } private void UpdateVmNetworks ( ) { } private void updateVmNumaNodes ( ) { } private void addLogMessages ( VdcReturnValueBase returnValueBase ) { } @ Override protected List < Class < ? > > getValidationGroups ( ) { } @ Override protected void setActionMessageParameters ( ) { } @ Override protected boolean canDoAction ( ) { } protected boolean isDedicatedVdsExistOnSameCluster ( VmBase vm , ArrayList < String > canDoActionMessages ) { } protected boolean isValidPciAndIdeLimit ( VM vmFromParams ) { } private boolean isVmExist ( ) { } protected boolean areUpdatedFieldsLegal ( ) { } private boolean isRunningConfigurationNeeded ( ) { } private boolean isHotSetEnabled ( ) { } @ Override public List < PermissionSubject > getPermissionCheckSubjects ( ) { } private boolean isDedicatedVmForVdsChanged ( ) { } private boolean isCpuPinningChanged ( ) { } @ Override public Guid getVmId ( ) { } @ Override protected Map < String , Pair < String , String > > getExclusiveLocks ( ) { } @ Override protected Map < String , Pair < String , String > > getSharedLocks ( ) { } @ Override public List < QuotaConsumptionParameter > getQuotaVdsConsumptionParameters ( ) { } @ Override public String getEntityType ( ) { } @ Override public String getEntityOldName ( ) { } @ Override public String getEntityNewName ( ) { } @ Override public void setEntityId ( AuditLogableBase logable ) { } @ Override public void addQuotaPermissionSubject ( List < PermissionSubject > quotaPermissionList ) { } protected boolean isVirtioScsiEnabled ( ) { } public boolean isVirtioScsiEnabledForVm ( Guid vmId ) { } protected boolean isBalloonEnabled ( ) { } protected boolean isSoundDeviceEnabled ( ) { } protected boolean hasWatchdog ( ) { } public VmValidator createVmValidator ( VM vm ) { } @ Override public void init ( ) { } }

Fix:
auditLogDirector . log ( logable , FAILED_HOT_SET_MEMORY ) ;