Buggy code:
public class DataContractManager implements Facility { public static final String CONTRACT_TYPE_NAME_VALIDATOR = "tales.contracts.contract_type_name" ; public static final String CONTRACT_MEMBER_NAME_VALIDATOR = "tales.contracts.contract_member_name" ; private final NameValidator typeNameValidator ; private final NameValidator memberNameValidator ; private final Map < JavaType , DataContractType > dataContractTypes = new ConcurrentHashMap < JavaType , DataContractType > ( 16 , 0.75F , 1 ) ; private final Object lock = new Object ( ) ; public DataContractManager ( ) { } public DataContractManager ( NameValidator theTypeNameValidator , NameValidator theMemberNameValidator ) { } public DataContractType generateType ( JavaType theType ) { } private DataContractType _generateType ( JavaType theType ) { } private DataContractField generateField ( DataContractType theDeclaringType , Field theField ) { DataContractField dataContractField = null ; DataMember dataMemberAnnotation = theField . getAnnotation ( DataMember . class ) ; if ( dataMemberAnnotation != null ) { Class < ? > fieldClass = theField . getType ( ) ; Type fieldGenericType = theField . getGenericType ( ) ; FieldSite fieldSite = new FieldSite ( theDeclaringType . getType ( ) . getType ( ) , theField ) ; theField . setAccessible ( true ) ; String fieldName = ( Strings . isNullOrEmpty ( dataMemberAnnotation . name ( ) ) ) ? theField . getName ( ) : dataMemberAnnotation . name ( ) ; if ( ! ( memberNameValidator . isValid ( fieldName ) ) ) { throw new IllegalStateException ( String . format ( "Field<seq2seq4repair_space>'%s.%s'<seq2seq4repair_space>is<seq2seq4repair_space>using<seq2seq4repair_space>the<seq2seq4repair_space>name<seq2seq4repair_space>'%s'<seq2seq4repair_space>that<seq2seq4repair_space>does<seq2seq4repair_space>not<seq2seq4repair_space>conform<seq2seq4repair_space>to<seq2seq4repair_space>validator<seq2seq4repair_space>'%s'." , theDeclaringType . getType ( ) . getName ( ) , fieldSite . getName ( ) , fieldName , memberNameValidator . getClass ( ) . getSimpleName ( ) ) ) ; } if ( ( Map . class . isAssignableFrom ( fieldClass ) ) && ( fieldGenericType instanceof ParameterizedType ) ) { JavaType declaredKeyType = new JavaType ( ( ( ParameterizedType ) ( fieldGenericType ) ) . getActualTypeArguments ( ) [ 0 ] ) ; List < ValueType < DataContractType , DataContractField > > keyTypes = extractValueTypes ( theField , declaredKeyType , dataMemberAnnotation . keyTypes ( ) ) ; if ( ( keyTypes . size ( ) ) == 0 ) { keyTypes . add ( new ValueType ( declaredKeyType , _generateType ( declaredKeyType ) ) ) ; } JavaType declaredValueType = new JavaType ( ( ( ParameterizedType ) ( fieldGenericType ) ) . getActualTypeArguments ( ) [ 1 ] ) ; List < ValueType < DataContractType , DataContractField > > valueTypes = extractValueTypes ( theField , declaredValueType , dataMemberAnnotation . valueTypes ( ) ) ; if ( ( valueTypes . size ( ) ) == 0 ) { valueTypes . add ( new ValueType ( declaredValueType , _generateType ( declaredValueType ) ) ) ; } dataContractField = new DataContractField ( fieldName , keyTypes , valueTypes , fieldSite , theDeclaringType , theDeclaringType ) ; } else if ( ( Collection . class . isAssignableFrom ( fieldClass ) ) && ( fieldGenericType instanceof ParameterizedType ) ) { JavaType declaredValueType = new JavaType ( ( ( ParameterizedType ) ( fieldGenericType ) ) . getActualTypeArguments ( ) [ 0 ] ) ; List < ValueType < DataContractType , DataContractField > > valueTypes = extractValueTypes ( theField , declaredValueType , dataMemberAnnotation . valueTypes ( ) ) ; if ( ( valueTypes . size ( ) ) == 0 ) { valueTypes . add ( new ValueType ( declaredValueType , _generateType ( declaredValueType ) ) ) ; } dataContractField = new DataContractField ( fieldName , FieldValueType . COLLECTION , valueTypes , fieldSite , theDeclaringType , theDeclaringType ) ; } else if ( fieldClass . isArray ( ) ) { JavaType declaredValueType = new JavaType ( TypeUtility . extractComponentType ( fieldGenericType ) ) ; List < ValueType < DataContractType , DataContractField > > valueTypes = extractValueTypes ( theField , declaredValueType , dataMemberAnnotation . valueTypes ( ) ) ; if ( ( valueTypes . size ( ) ) == 0 ) { <START_BUG> valueTypes . add ( new ValueType ( declaredValueType , generateType ( declaredValueType ) ) ) ; <END_BUG> } dataContractField = new DataContractField ( fieldName , FieldValueType . COLLECTION , valueTypes , fieldSite , theDeclaringType , theDeclaringType ) ; } else { List < ValueType < DataContractType , DataContractField > > valueTypes = extractValueTypes ( theField , fieldSite . getType ( ) , dataMemberAnnotation . valueTypes ( ) ) ; if ( ( valueTypes . size ( ) ) == 0 ) { valueTypes . add ( new ValueType ( fieldSite . getType ( ) , _generateType ( fieldSite . getType ( ) ) ) ) ; } dataContractField = new DataContractField ( fieldName , FieldValueType . OBJECT , valueTypes , fieldSite , theDeclaringType , theDeclaringType ) ; } } return dataContractField ; } private List < ValueType < DataContractType , DataContractField > > extractValueTypes ( Field theField , JavaType theDeclaredType , Class < ? > [ ] theDesiredTypes ) { } }

Fix:
valueTypes . add ( new ValueType ( declaredValueType , _generateType ( declaredValueType ) ) ) ;