Buggy code:
@ SuppressWarnings ( "restriction" ) public class VariableValueExtractor { private static final String TO_STRING_SIGN = "()Ljava//lang//String;" ; private static final String TO_STRING_NAME = "toString" ; private static final Pattern OBJECT_ACCESS_PATTERN = Pattern . compile ( "^\\.([^.\\[]+)(\\..+)*(\\[.+)*$" ) ; private static final Pattern ARRAY_ACCESS_PATTERN = Pattern . compile ( "^\\[(\\d+)\\](.*)$" ) ; private Map < Long , ReferenceValue > objectPool = new HashMap < > ( ) ; private BreakPoint bkp ; private ThreadReference thread ; private Location loc ; public VariableValueExtractor ( BreakPoint bkp , ThreadReference thread , Location loc ) { } public final BreakPointValue extractValue ( ) throws AbsentInformationException , IncompatibleThreadStateException { } private List < Variable > collectAllVariable ( List < LocalVariable > visibleVars , List < Field > allFields ) { } private LocalVariable findMatchedLocalVariable ( Variable bpVar , List < LocalVariable > visibleVars ) { } private Field findMatchedField ( Variable bpVar , List < Field > allFields ) { } protected void collectValue ( BreakPointValue bkVal , ObjectReference objRef , ThreadReference thread , Map < Variable , JDIParam > allVariables ) { } protected String extractSubProperty ( final String fullName ) { } protected JDIParam recursiveMatch ( final StackFrame frame , final LocalVariable match , final String fullName ) { } protected JDIParam recursiveMatch ( JDIParam param , final String property ) { } private Value getArrayEleValue ( ArrayReference array , int index ) { } private void appendVarVal ( VarValue parent , Variable variable , Value value , int level , ThreadReference thread , boolean isRoot ) { } private synchronized String toPrimitiveValue ( ClassType type , ObjectReference value , ThreadReference thread ) { } private void appendClassVarVal ( VarValue parent , Variable variable , ObjectReference objRef , int level , ThreadReference thread , boolean isRoot ) { ClassType type = ( ( ClassType ) ( objRef . type ( ) ) ) ; long refID = objRef . uniqueID ( ) ; ReferenceValue val = this . objectPool . get ( refID ) ; if ( val == null ) { val = new ReferenceValue ( false , refID , isRoot , variable ) ; setMessageValue ( thread , val ) ; this . objectPool . put ( refID , val ) ; boolean needParseFields = HeuristicIgnoringFieldRule . isNeedParsingFields ( type ) ; if ( needParseFields ) { Map < Field , Value > fieldValueMap = objRef . getValues ( type . allFields ( ) ) ; for ( Field field : type . allFields ( ) ) { Value childVarValue = fieldValueMap . get ( field ) ; if ( type . isEnum ( ) ) { <START_BUG> String childTypeName = childVarValue . type ( ) . name ( ) ; <END_BUG> if ( childTypeName . equals ( type . name ( ) ) ) { continue ; } } boolean isIgnore = HeuristicIgnoringFieldRule . isForIgnore ( type , field . name ( ) ) ; if ( ! isIgnore ) { if ( childVarValue != null ) { FieldVar var = new FieldVar ( field . isStatic ( ) , field . name ( ) , childVarValue . type ( ) . toString ( ) ) ; appendVarVal ( val , var , childVarValue , level , thread , false ) ; } } } } } else if ( ! ( val . getVarName ( ) . equals ( variable . getName ( ) ) ) ) { ReferenceValue cachedValue = val ; val = new ReferenceValue ( false , refID , isRoot , variable ) ; val . setChildren ( cachedValue . getChildren ( ) ) ; for ( VarValue child : cachedValue . getChildren ( ) ) { child . addParent ( val ) ; } } parent . addChild ( val ) ; val . addParent ( parent ) ; } private void setMessageValue ( ThreadReference thread , ReferenceValue val ) { } private void appendArrVarVal ( VarValue parent , Variable variable , ArrayReference value , int level , ThreadReference thread , boolean isRoot ) { } protected StackFrame findFrameByLocation ( List < StackFrame > frames , Location location ) throws AbsentInformationException { } private boolean areLocationsEqual ( Location location1 , Location location2 ) throws AbsentInformationException { } }

Fix:
String childTypeName = field . typeName ( ) ;