#vulnerable code 
                                @Override
    public PropertyReader getPropertyReader(final ClassInfo classInfo, String propertyName) {
        if(propertyReaderCache.get(classInfo) == null) {
            propertyReaderCache.put(classInfo, new HashMap<String, PropertyReader>());
        }
        PropertyReader reader =  propertyReaderCache.get(classInfo).get(propertyName);
        if(reader != null) {
            return reader;
        }

        MethodInfo getterInfo = classInfo.propertyGetter(propertyName);
        PropertyReader propertyReader =  determinePropertyAccessor(classInfo, propertyName, getterInfo, new AccessorFactory<PropertyReader>() {
            @Override
            public PropertyReader makeMethodAccessor(MethodInfo methodInfo) {
                return new MethodReader(classInfo, methodInfo);
            }

            @Override
            public PropertyReader makeFieldAccessor(FieldInfo fieldInfo) {
                return new FieldReader(classInfo, fieldInfo);
            }
        });
        propertyReaderCache.get(classInfo).put(propertyName, propertyReader);
        return propertyReader;
    } 
                            #location 6 
                            #vulnerability type NULL_DEREFERENCE
#fixed code
                                @Override
    public PropertyReader getPropertyReader(final ClassInfo classInfo, String propertyName) {
        if(!propertyReaderCache.containsKey(classInfo)) {
            propertyReaderCache.put(classInfo, new HashMap<String, PropertyReader>());
        }
        if(propertyReaderCache.get(classInfo).containsKey(propertyName)) {
            return propertyReaderCache.get(classInfo).get(propertyName);
        }

        MethodInfo getterInfo = classInfo.propertyGetter(propertyName);
        PropertyReader propertyReader =  determinePropertyAccessor(classInfo, propertyName, getterInfo, new AccessorFactory<PropertyReader>() {
            @Override
            public PropertyReader makeMethodAccessor(MethodInfo methodInfo) {
                return new MethodReader(classInfo, methodInfo);
            }

            @Override
            public PropertyReader makeFieldAccessor(FieldInfo fieldInfo) {
                return new FieldReader(classInfo, fieldInfo);
            }
        });
        propertyReaderCache.get(classInfo).put(propertyName, propertyReader);
        return propertyReader;
    }