question: public static boolean stringLengthOK ( String s ) { if ( s == null ) { throw new IllegalArgumentException ( "s is null" ) ; } Boolean b = stringLengthOKCached . get ( s ) ; if ( b != null ) { return b ; } boolean retval = isOKLength ( s ) ; stringLengthOKCached . put ( s , retval ) ; return retval ; }
target:  Returns true if the given string is deemed to be reasonable (i.e. not too long) based on the --string-maxlen=N parameter. <p> If Randoop generates tests using strings that are too long, this can result in non-compilable tests due to the JVM's limit on the length of a string. <p> A string S is too long if, when printed as code in a generated unit test, it may result in a non-compilable test. In order to determine this, we have to consider not the length of s, but the length of the string that would be printed to obtain s, which may be different due to escaped and unicode characters. This method takes this into account.