Buggy code:
} private static class SimpleIntDescriptorValidator implements ModelTestModelDescriptionValidator . ArbitraryDescriptorValidator { static final ModelTestModelDescriptionValidator . SimpleIntDescriptorValidator INSTANCE = new ModelTestModelDescriptionValidator . SimpleIntDescriptorValidator ( ) ; @ Override public String validate ( ModelNode currentNode , String descriptor ) { if ( currentNode . hasDefined ( descriptor ) ) { try { currentNode . get ( descriptor ) . asInt ( ) ; } catch ( Exception e ) { return ( "'" + descriptor ) + "'<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>an<seq2seq4repair_space>int" ; } } return null ; } } private static class NumericDescriptorValidator implements ModelTestModelDescriptionValidator . AttributeOrParameterArbitraryDescriptorValidator { static final ModelTestModelDescriptionValidator . NumericDescriptorValidator INSTANCE = new ModelTestModelDescriptionValidator . NumericDescriptorValidator ( ) ; public String validate ( ModelType currentType , ModelNode currentNode , String descriptor ) { } } private static class LengthDescriptorValidator implements ModelTestModelDescriptionValidator . AttributeOrParameterArbitraryDescriptorValidator { static final ModelTestModelDescriptionValidator . LengthDescriptorValidator INSTANCE = new ModelTestModelDescriptionValidator . LengthDescriptorValidator ( ) ; public String validate ( ModelType currentType , ModelNode currentNode , String descriptor ) { } } private static class BooleanDescriptorValidator implements ModelTestModelDescriptionValidator . ArbitraryDescriptorValidator , ModelTestModelDescriptionValidator . AttributeOrParameterArbitraryDescriptorValidator { static final ModelTestModelDescriptionValidator . BooleanDescriptorValidator INSTANCE = new ModelTestModelDescriptionValidator . BooleanDescriptorValidator ( ) ; public String validate ( ModelType currentType , ModelNode currentNode , String descriptor ) { } @ Override public String validate ( ModelNode currentNode , String descriptor ) { return validate ( null , currentNode , descriptor ) ; } } private static class AccessTypeDescriptorValidator implements ModelTestModelDescriptionValidator . AttributeOrParameterArbitraryDescriptorValidator { static final ModelTestModelDescriptionValidator . AccessTypeDescriptorValidator INSTANCE = new ModelTestModelDescriptionValidator . AccessTypeDescriptorValidator ( ) ; public String validate ( ModelType currentType , ModelNode currentNode , String descriptor ) { } } private static class StorageDescriptorValidator implements ModelTestModelDescriptionValidator . AttributeOrParameterArbitraryDescriptorValidator { static final ModelTestModelDescriptionValidator . StorageDescriptorValidator INSTANCE = new ModelTestModelDescriptionValidator . StorageDescriptorValidator ( ) ; public String validate ( ModelType currentType , ModelNode currentNode , String descriptor ) { } } private static class NullDescriptorValidator implements ModelTestModelDescriptionValidator . ArbitraryDescriptorValidator , ModelTestModelDescriptionValidator . AttributeOrParameterArbitraryDescriptorValidator { static final ModelTestModelDescriptionValidator . NullDescriptorValidator INSTANCE = new ModelTestModelDescriptionValidator . NullDescriptorValidator ( ) ; @ Override public String validate ( ModelType currentType , ModelNode currentNode , String descriptor ) { } @ Override public String validate ( ModelNode currentNode , String descriptor ) { return null ; } } private static class DeprecatedDescriptorValidator implements ModelTestModelDescriptionValidator . ArbitraryDescriptorValidator , ModelTestModelDescriptionValidator . AttributeOrParameterArbitraryDescriptorValidator { static final ModelTestModelDescriptionValidator . DeprecatedDescriptorValidator INSTANCE = new ModelTestModelDescriptionValidator . DeprecatedDescriptorValidator ( ) ; @ Override public String validate ( ModelNode currentNode , String descriptor ) { if ( ! ( currentNode . get ( descriptor ) . hasDefined ( SINCE ) ) ) { return ( "model<seq2seq4repair_space>key<seq2seq4repair_space>'since'<seq2seq4repair_space>is<seq2seq4repair_space>missing<seq2seq4repair_space>on<seq2seq4repair_space>deprecated<seq2seq4repair_space>definition<seq2seq4repair_space>for<seq2seq4repair_space>'" + descriptor ) + "'" ; } if ( ! ( currentNode . get ( descriptor ) . hasDefined ( REASON ) ) ) { return ( "model<seq2seq4repair_space>key<seq2seq4repair_space>'reason'<seq2seq4repair_space>is<seq2seq4repair_space>missing<seq2seq4repair_space>on<seq2seq4repair_space>deprecated<seq2seq4repair_space>definition<seq2seq4repair_space>for<seq2seq4repair_space>'" + descriptor ) + "'" ; } return null ; } @ Override public String validate ( ModelType currentType , ModelNode currentNode , String descriptor ) { } } private static class StringListValidator implements ModelTestModelDescriptionValidator . ArbitraryDescriptorValidator , ModelTestModelDescriptionValidator . AttributeOrParameterArbitraryDescriptorValidator { static final ModelTestModelDescriptionValidator . StringListValidator INSTANCE = new ModelTestModelDescriptionValidator . StringListValidator ( ) ; @ Override public String validate ( ModelType currentType , ModelNode currentNode , String descriptor ) { } @ Override public String validate ( ModelNode currentNode , String descriptor ) { if ( currentNode . hasDefined ( descriptor ) ) { List < ModelNode > list ; try { list = currentNode . asList ( ) ; } catch ( Exception e ) { return ( "'" + descriptor ) + "'<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>a<seq2seq4repair_space>list" ; } for ( ModelNode entry : list ) { try { <START_BUG> String s = entry . asString ( ) ; <END_BUG> } catch ( Exception e ) { return ( "'" + descriptor ) + "'<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>a<seq2seq4repair_space>string" ; } } } return null ; } } public static class ValidationConfiguration { private Map < ModelNode , Set < String > > nullValueTypeAttributes = new HashMap < ModelNode , Set < String > > ( ) ; private Map < ModelNode , Map < String , Set < String > > > nullValueTypeOperations = new HashMap < ModelNode , Map < String , Set < String > > > ( ) ; private Map < ModelNode , Map < String , Map < String , ModelTestModelDescriptionValidator . AttributeOrParameterArbitraryDescriptorValidator > > > attributeDescriptors = new HashMap < ModelNode , Map < String , Map < String , ModelTestModelDescriptionValidator . AttributeOrParameterArbitraryDescriptorValidator > > > ( ) ; private Map < ModelNode , Map < String , Map < String , Map < String , ModelTestModelDescriptionValidator . AttributeOrParameterArbitraryDescriptorValidator > > > > operationParameterDescriptors = new HashMap < ModelNode , Map < String , Map < String , Map < String , ModelTestModelDescriptionValidator . AttributeOrParameterArbitraryDescriptorValidator > > > > ( ) ; public void allowNullValueTypeForAttribute ( ModelNode address , String name ) { } public void allowNullValueTypeForOperation ( ModelNode address , String operation ) { } public void allowNullValueTypeForOperationReplyProperties ( ModelNode address , String operation ) { } public void allowNullValueTypeForOperationParameter ( ModelNode address , String operation , String param ) { } public void registerAttributeArbitraryDescriptor ( ModelNode address , String name , String descriptor , ModelTestModelDescriptionValidator . AttributeOrParameterArbitraryDescriptorValidator validator ) { } public void registerArbitraryDescriptorForOperation ( ModelNode address , String operation , String descriptor , ModelTestModelDescriptionValidator . AttributeOrParameterArbitraryDescriptorValidator validator ) { } public void registerArbitraryDescriptorForOperationReplyProperties ( ModelNode address , String operation , String descriptor , ModelTestModelDescriptionValidator . AttributeOrParameterArbitraryDescriptorValidator validator ) { } public void registerArbitraryDescriptorForOperationParameter ( ModelNode address , String operation , String parameter , String descriptor , ModelTestModelDescriptionValidator . AttributeOrParameterArbitraryDescriptorValidator validator ) { } private ModelTestModelDescriptionValidator . AttributeOrParameterArbitraryDescriptorValidator getAttributeValidator ( ModelNode address , String name , String descriptor ) { } private ModelTestModelDescriptionValidator . AttributeOrParameterArbitraryDescriptorValidator getOperationParameterValidator ( ModelNode address , String operation , String parameter , String descriptor ) { } private boolean isAllowNullValueTypeForOperationParameter ( ModelNode address , String operation , String param ) { } private boolean isAllowNullValueTypeForAttribute ( ModelNode address , String name ) { }

Fix:
entry . asString ( ) ;