Buggy code:
private final ModelNode serverGroup ; private final String profileName ; private final DomainController domainController ; ManagedServerOperationsFactory ( final String serverName , final ModelNode domainModel , final ModelNode hostModel , final DomainController domainController ) { } ModelNode getBootUpdates ( ) { } private void addNamespaces ( List < ModelNode > updates ) { } private void addNamespaces ( Map < String , ModelNode > map , ModelNode namespaces ) { } private void addProfileName ( List < ModelNode > updates ) { } private void addSchemaLocations ( List < ModelNode > updates ) { } private void addSchemaLocations ( Map < String , ModelNode > map , ModelNode namespaces ) { } private void addExtensions ( List < ModelNode > updates ) { } private void addExtensions ( Set < String > extensionNames , ModelNode extensions ) { } private void addPaths ( List < ModelNode > updates ) { } private void addPaths ( Map < String , ModelNode > map , ModelNode path ) { } private void addSystemProperties ( List < ModelNode > updates ) { } private Map < String , String > getAllSystemProperties ( boolean boottimeOnly ) { } private void addSystemProperties ( final ModelNode source , final Map < String , String > props , boolean boottimeOnly ) { } private void addVault ( List < ModelNode > updates ) { } private void addVault ( List < ModelNode > updates , ModelNode vaultNode ) { } private void addManagementSecurityRealms ( List < ModelNode > updates ) { } private void addManagementComponentComponent ( ModelNode realm , ModelNode parentAddress , String key , List < ModelNode > updates ) { } private void addManagementConnections ( List < ModelNode > updates ) { } private void addInterfaces ( List < ModelNode > updates ) { } private void addInterfaces ( Map < String , ModelNode > map , ModelNode iface ) { } private void addSocketBindings ( List < ModelNode > updates , int portOffSet , String bindingRef ) { } private void mergeBindingGroups ( List < ModelNode > updates , Map < String , ModelNode > groups , final String groupName , ModelNode group , Set < String > processed ) { } private void addSocketBindings ( List < ModelNode > updates , ModelNode group , final String groupName , ModelNode defaultInterface ) { } private void addSubsystems ( List < ModelNode > updates ) { } private void addDeployments ( List < ModelNode > updates ) { } public void addDeploymentOverlays ( final List < ModelNode > updates ) { if ( domainModel . hasDefined ( DEPLOYMENT_OVERLAY ) ) { HostFileRepository remoteRepository = null ; if ( ! ( domainController . getLocalHostInfo ( ) . isMasterDomainController ( ) ) ) { remoteRepository = domainController . getRemoteFileRepository ( ) ; } for ( Property deploymentOverlay : domainModel . get ( DEPLOYMENT_OVERLAY ) . asPropertyList ( ) ) { String name = deploymentOverlay . getName ( ) ; ModelNode details = deploymentOverlay . getValue ( ) ; PathAddress addr = PathAddress . pathAddress ( PathElement . pathElement ( DEPLOYMENT_OVERLAY , name ) ) ; ModelNode addOp = Util . getEmptyOperation ( ADD , addr . toModelNode ( ) ) ; updates . add ( addOp ) ; if ( details . hasDefined ( CONTENT ) ) { for ( Property content : details . get ( CONTENT ) . asPropertyList ( ) ) { final String contentName = content . getName ( ) ; final ModelNode contentDetails = content . getValue ( ) ; byte [ ] hash = contentDetails . require ( CONTENT ) . asBytes ( ) ; File [ ] files = domainController . getLocalFileRepository ( ) . getDeploymentFiles ( hash ) ; if ( ( files == null ) || ( ( files . length ) == 0 ) ) { if ( remoteRepository != null ) { remoteRepository . getDeploymentFiles ( hash ) ; } } addr = PathAddress . pathAddress ( PathElement . pathElement ( DEPLOYMENT_OVERLAY , name ) , PathElement . pathElement ( CONTENT , contentName ) ) ; addOp = Util . getEmptyOperation ( ADD , addr . toModelNode ( ) ) ; <START_BUG> addOp . get ( CONTENT ) . set ( contentDetails . get ( CONTENT ) ) ; <END_BUG> updates . add ( addOp ) ; } } if ( serverGroup . hasDefined ( DEPLOYMENT_OVERLAY ) ) { final ModelNode groupOverlay = serverGroup . get ( DEPLOYMENT_OVERLAY ) . asObject ( ) ; if ( groupOverlay . has ( name ) ) { List < Property > deployments = groupOverlay . get ( name ) . asPropertyList ( ) ; for ( Property content : deployments ) { final String deploymentName = content . getName ( ) ; final ModelNode deploymentDetails = content . getValue ( ) ; boolean regEx = ( deploymentDetails . hasDefined ( REGULAR_EXPRESSION ) ) ? deploymentDetails . require ( REGULAR_EXPRESSION ) . asBoolean ( ) : false ; addr = PathAddress . pathAddress ( PathElement . pathElement ( DEPLOYMENT_OVERLAY , name ) , PathElement . pathElement ( DEPLOYMENT , deploymentName ) ) ; addOp = Util . getEmptyOperation ( ADD , addr . toModelNode ( ) ) ; addOp . get ( REGULAR_EXPRESSION ) . set ( regEx ) ; updates . add ( addOp ) ; } } } } } } private ModelNode pathAddress ( PathElement ... elements ) { } private String addPathProperty ( final List < String > command , final String typeName , final String propertyName , final Map < String , String > properties , final DirectoryGrouping directoryGrouping , final File typeDir , File serverDir ) { } static String getAbsolutePath ( final File root , final String ... paths ) { } private class ModelNodeList extends AbstractList < ModelNode > implements List < ModelNode > { private final ModelNode model = new ModelNode ( ) . setEmptyList ( ) ; @ Override public boolean add ( ModelNode modelNode ) { }

Fix:
addOp . get ( CONTENT ) . get ( HASH ) . set ( contentDetails . get ( CONTENT ) ) ;