Buggy code:
public class DeploymentHandlerUtil { static class ContentItem { private byte [ ] hash ; private String path ; private String relativeTo ; private boolean isArchive ; ContentItem ( final byte [ ] hash ) { } ContentItem ( final String path , final String relativeTo , final boolean isArchive ) { } byte [ ] getHash ( ) { } } private DeploymentHandlerUtil ( ) { } public static void deploy ( final OperationContext context , final String deploymentUnitName , final String managementName , final AbstractVaultReader vaultReader , final DeploymentHandlerUtil . ContentItem ... contents ) throws OperationFailedException { } public static Collection < ServiceController < ? > > doDeploy ( final OperationContext context , final String deploymentUnitName , final String managementName , final ServiceVerificationHandler verificationHandler , final Resource deploymentResource , final ImmutableManagementResourceRegistration registration , final ManagementResourceRegistration mutableRegistration , final AbstractVaultReader vaultReader , final DeploymentHandlerUtil . ContentItem ... contents ) { } public static void redeploy ( final OperationContext context , final String deploymentUnitName , final String managementName , final AbstractVaultReader vaultReader , final DeploymentHandlerUtil . ContentItem ... contents ) throws OperationFailedException { assert contents != null : "contents<seq2seq4repair_space>is<seq2seq4repair_space>null" ; if ( context . isNormalServer ( ) ) { final Resource deployment = context . readResourceForUpdate ( EMPTY_ADDRESS ) ; final ImmutableManagementResourceRegistration registration = context . getResourceRegistration ( ) ; final ManagementResourceRegistration mutableRegistration = context . getResourceRegistrationForUpdate ( ) ; DeploymentModelUtils . cleanup ( deployment ) ; context . addStep ( new OperationStepHandler ( ) { public void execute ( final OperationContext context , ModelNode operation ) throws OperationFailedException { final ServiceName deploymentUnitServiceName = Services . deploymentUnitName ( deploymentUnitName ) ; context . removeService ( deploymentUnitServiceName ) ; context . removeService ( deploymentUnitServiceName . append ( "contents" ) ) ; final AtomicBoolean logged = new AtomicBoolean ( false ) ; context . addStep ( new OperationStepHandler ( ) { @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { ServiceVerificationHandler verificationHandler = new ServiceVerificationHandler ( ) ; context . addStep ( verificationHandler , VERIFY ) ; DeploymentHandlerUtil . doDeploy ( context , deploymentUnitName , managementName , verificationHandler , deployment , registration , mutableRegistration , vaultReader , contents ) ; context . completeStep ( new OperationContext . ResultHandler ( ) { @ Override public void handleResult ( OperationContext . ResultAction resultAction , OperationContext context , ModelNode operation ) { if ( resultAction == ( ResultAction . ROLLBACK ) ) { if ( context . hasFailureDescription ( ) ) { ROOT_LOGGER . redeployRolledBack ( deploymentUnitName , DeploymentHandlerUtil . getFormattedFailureDescription ( context ) ) ; logged . set ( true ) ; } else { ROOT_LOGGER . redeployRolledBackWithNoMessage ( deploymentUnitName ) ; logged . set ( true ) ; } } else { ROOT_LOGGER . deploymentRedeployed ( deploymentUnitName ) ; } } } ) ; } <START_BUG> } , IMMEDIATE ) ; <END_BUG> context . completeStep ( new OperationContext . RollbackHandler ( ) { @ Override public void handleRollback ( OperationContext context , ModelNode operation ) { ServiceVerificationHandler verificationHandler = new ServiceVerificationHandler ( ) ; DeploymentHandlerUtil . doDeploy ( context , deploymentUnitName , managementName , verificationHandler , deployment , registration , mutableRegistration , vaultReader , contents ) ; if ( ! ( logged . get ( ) ) ) { if ( context . hasFailureDescription ( ) ) { ROOT_LOGGER . undeploymentRolledBack ( deploymentUnitName , context . getFailureDescription ( ) . asString ( ) ) ; } else { ROOT_LOGGER . undeploymentRolledBackWithNoMessage ( deploymentUnitName ) ; } } } } ) ; } } , RUNTIME ) ; } } public static void replace ( final OperationContext context , final ModelNode originalDeployment , final String deploymentUnitName , final String managementName , final String replacedDeploymentUnitName , final AbstractVaultReader vaultReader , final DeploymentHandlerUtil . ContentItem ... contents ) throws OperationFailedException { } public static void undeploy ( final OperationContext context , final String managementName , final String deploymentUnitName , final AbstractVaultReader vaultReader ) { } private static String getFormattedFailureDescription ( OperationContext context ) { } }

Fix:
} , RUNTIME , true ) ;