code: private void removeReferenceDataValuesInComponents(final ReferenceData referenceData,
              final Class<?> referenceDataClass) {
          final Collection<ComponentBuilder> componentBuilders = _analysisJobBuilder.getComponentBuilders();
          for (final ComponentBuilder componentBuilder : componentBuilders) {
              final Map<ConfiguredPropertyDescriptor, Object> configuredProperties =
                      componentBuilder.getConfiguredProperties();
              for (final Map.Entry<ConfiguredPropertyDescriptor, Object> entry : configuredProperties.entrySet()) {
                  final ConfiguredPropertyDescriptor propertyDescriptor = entry.getKey();
                  if (referenceDataClass.isAssignableFrom(propertyDescriptor.getBaseType())) {
                      final Object valueObject = entry.getValue();
                      // In some cases the configured property is an array
                      if (valueObject.getClass().isArray()) {
                          final Object[] values = (Object[]) valueObject;
                          final Class<?> componentType = valueObject.getClass().getComponentType();
                          // create the new array
                          final Object[] newArray = (Object[]) Array.newInstance(componentType, values.length - 1);
                          int j = 0;
                          for (int i = 0; i < values.length; i++) {
                              if (!referenceData.equals(values[i])) {
                                  // keep only the values different than the one select to be removed
                                  newArray[j] = values[i];
                                  j++;
                              }
                          }
                          componentBuilder.setConfiguredProperty(propertyDescriptor, newArray);
                      } else {
                          if (referenceData.equals(valueObject)) {
                              componentBuilder.setConfiguredProperty(propertyDescriptor, null);
                          }
                      }
                  }
              }
          }
      }
docs: Method used to remove the reference data(String Patterns, Dictionaries,
  Synonyms) components' values in components
  
  @param referenceData
  @param referenceDataClass