ValidationResultType (@NotNull String data, @NotNull EventContext context) { if (isThirdPartyValue(data)) return ValidationResultType.ACCEPTED; final String id = getEventDataField(context, "id"); final String group = getEventDataField(context, "group"); if (isValid(data, id, group)) { ProductivityFeaturesRegistry registry = ProductivityFeaturesRegistry.getInstance(); FeatureDescriptor descriptor = registry == null ? null : registry.getFeatureDescriptor(id); if (descriptor != null) { final String actualGroup = descriptor.getGroupId(); if (StringUtil.equals(group, "unknown") || StringUtil.equals(group, actualGroup)) { final Class<? extends ProductivityFeaturesProvider> provider = descriptor.getProvider(); final PluginInfo info = provider == null ? PluginInfoDetectorKt.getPlatformPlugin() : getPluginInfo(provider); return info.isDevelopedByJetBrains() ? ValidationResultType.ACCEPTED : ValidationResultType.THIRD_PARTY; } } } return ValidationResultType.REJECTED; }