private static boolean matchesProperty(int propertyKind, long nameOffset, String name, String propertyName, long id) {
        return
                // match property by id
                (propertyKind == 0 && id >= 0 && id == nameOffset) ||
                        // match property by name
                        (propertyKind == 1 && name != null && name.equals(propertyName));
    }
Get property tag id by property set GUID and string name or numerical name from named properties mapping

@param guid Property set GUID in registry format without brackets.
            May be one of the PS_* or PSETID_* constants
@param name Property name in case of string named property
@param id   Property id in case of numerical named property
@return Property tag which can be matched with {@link MAPIProperty#id}
or 0 if the property could not be found.
tika-parsers/tika-parsers-standard/tika-parsers-standard-modules/tika-parser-microsoft-module/src/main/java/org/apache/tika/parser/microsoft/msg/TikaNameIdChunks.java