#vulnerable code 
                                public FieldInfo propertyField(String propertyName) {
        for (FieldInfo fieldInfo : propertyFields()) {
            if (fieldInfo.property().equalsIgnoreCase(propertyName)) {
                return fieldInfo;
            }
        }
        return null;
    } 
                            #location 3 
                            #vulnerability type NULL_DEREFERENCE
#fixed code
                                public FieldInfo propertyField(String propertyName) {
        if (propertyFields == null) {
            Collection<FieldInfo> fieldInfos = propertyFields();
            propertyFields = new HashMap<>(fieldInfos.size());
            for (FieldInfo fieldInfo : fieldInfos) {
                propertyFields.put(fieldInfo.property(), fieldInfo);
            }
        }
        return propertyFields.get(propertyName);
    }