Buggy code:
public class ModelTestUtils { public static String readResource ( final Class < ? > clazz , final String name ) throws IOException { } public static ModelNode checkResultAndGetContents ( ModelNode result ) { } public static ModelNode checkOutcome ( ModelNode result ) { } public static ModelNode checkFailed ( ModelNode result ) { } public static void validateModelDescriptions ( PathAddress address , ImmutableManagementResourceRegistration reg ) { } public static void compare ( ModelNode node1 , ModelNode node2 ) { } public static void compare ( ModelNode node1 , ModelNode node2 , boolean ignoreUndefined ) { } public static String normalizeXML ( String xml ) throws Exception { } public static void compareXml ( final String original , final String marshalled ) throws Exception { } public static void compareXml ( final String original , final String marshalled , final boolean ignoreNamespace ) throws Exception { } public static ModelNode getSubModel ( ModelNode model , PathElement pathElement ) { } public static ModelNode getSubModel ( ModelNode model , PathAddress pathAddress ) { } private static String removeNamespace ( String xml ) { } private static void compare ( ModelNode node1 , ModelNode node2 , boolean ignoreUndefined , Stack < String > stack ) { } private static ModelNode trimUndefinedChildren ( ModelNode model ) { } private static String getCompareStackAsString ( Stack < String > stack ) { } public static void checkModelAgainstDefinition ( final ModelNode model , ManagementResourceRegistration rr ) { final Set < String > children = rr . getChildNames ( EMPTY_ADDRESS ) ; final Set < String > attributeNames = rr . getAttributeNames ( EMPTY_ADDRESS ) ; for ( ModelNode el : model . asList ( ) ) { String name = el . asProperty ( ) . getName ( ) ; ModelNode value = el . asProperty ( ) . getValue ( ) ; if ( attributeNames . contains ( name ) ) { AttributeAccess aa = rr . getAttributeAccess ( EMPTY_ADDRESS , name ) ; Assert . assertNotNull ( ( ( "Attribute<seq2seq4repair_space>" + name ) + "<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>known" ) , aa ) ; AttributeDefinition ad = aa . getAttributeDefinition ( ) ; if ( ! ( value . isDefined ( ) ) ) { <START_BUG> Assert . assertTrue ( "Attribute<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>allow<seq2seq4repair_space>null" , ad . isAllowNull ( ) ) ; <END_BUG> } else { } try { if ( ( ! ( ad . isAllowNull ( ) ) ) && ( value . isDefined ( ) ) ) { ad . getValidator ( ) . validateParameter ( name , value ) ; } } catch ( OperationFailedException e ) { Assert . fail ( ( ( ( "validation<seq2seq4repair_space>for<seq2seq4repair_space>attribute<seq2seq4repair_space>'" + name ) + "'<seq2seq4repair_space>failed,<seq2seq4repair_space>" ) + ( e . getFailureDescription ( ) . asString ( ) ) ) ) ; } } else if ( ! ( children . contains ( name ) ) ) { Assert . fail ( ( ( "Element<seq2seq4repair_space>'" + name ) + "'<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>known<seq2seq4repair_space>in<seq2seq4repair_space>target<seq2seq4repair_space>definition" ) ) ; } } for ( PathElement pe : rr . getChildAddresses ( EMPTY_ADDRESS ) ) { if ( pe . isWildcard ( ) ) { if ( ( children . contains ( pe . getKey ( ) ) ) && ( model . hasDefined ( pe . getKey ( ) ) ) ) { for ( ModelNode v : model . get ( pe . getKey ( ) ) . asList ( ) ) { String name = v . asProperty ( ) . getName ( ) ; ModelNode value = v . asProperty ( ) . getValue ( ) ; ManagementResourceRegistration sub = rr . getSubModel ( PathAddress . pathAddress ( pe ) ) ; Assert . assertNotNull ( ( ( "Child<seq2seq4repair_space>with<seq2seq4repair_space>name<seq2seq4repair_space>'" + name ) + "'<seq2seq4repair_space>not<seq2seq4repair_space>found" ) , sub ) ; if ( value . isDefined ( ) ) { ModelTestUtils . checkModelAgainstDefinition ( value , sub ) ; } } } } else { if ( children . contains ( pe . getKeyValuePair ( ) ) ) { String name = pe . getValue ( ) ; ModelNode value = model . get ( pe . getKeyValuePair ( ) ) ; ManagementResourceRegistration sub = rr . getSubModel ( PathAddress . pathAddress ( pe ) ) ; Assert . assertNotNull ( ( ( "Child<seq2seq4repair_space>with<seq2seq4repair_space>name<seq2seq4repair_space>'" + name ) + "'<seq2seq4repair_space>not<seq2seq4repair_space>found" ) , sub ) ; if ( value . isDefined ( ) ) { ModelTestUtils . checkModelAgainstDefinition ( value , sub ) ; } } } } } public static void checkFailedTransformedBootOperations ( ModelTestKernelServices < ? > mainServices , ModelVersion modelVersion , List < ModelNode > operations , FailedOperationTransformationConfig config ) throws OperationFailedException { } private static void checkFailedTransformedAddOperation ( ModelTestKernelServices < ? > mainServices , ModelVersion modelVersion , ModelNode operation , FailedOperationTransformationConfig config ) throws OperationFailedException { } }

Fix:
Assert . assertTrue ( ( ( "Attribute<seq2seq4repair_space>" + name ) + "<seq2seq4repair_space>does<seq2seq4repair_space>not<seq2seq4repair_space>allow<seq2seq4repair_space>null" ) , ad . isAllowNull ( ) ) ;