Java wrapper for {@link FeatureSpec#extractWithSettings(String, FeatureBuilder, ClassTag).
161193
public JRecordExtractor<T, LabeledPoint>
  extractWithSubsetSettingsLabeledPoint(String settings) {
    return new JRecordExtractor<>(JavaOps.extractWithSubsetSettingsLabeledPoint(self, settings));
  }
775835
private static int extractOptions(String pattern, int i, List options) {
    while ((i < pattern.length()) && (pattern.charAt(i) == '{')) {
      int end = pattern.indexOf('}', i);

      if (end == -1) {
        break;
      }

      String r = pattern.substring(i + 1, end);
      options.add(r);
      i = end + 1;
    }

    return i;
  }
803926
@SuppressWarnings("unchecked")
  private Set<String> extractIgnorePatterns(Map<String, Object> configuration) {
    List<String> patterns = asList("glob:.*",// hidden files
        "glob:*~", "glob:#*#", "glob:.#*", // emacs
        "glob:*~", "glob:[._]*.s[a-w][a-z]", "glob:[._]s[a-w][a-z]", "glob:*.un~" // vim
    );
    Set<String> s = new HashSet<>((List<String>) configuration.getOrDefault("ignore-patterns",patterns));
    s.addAll(patterns);
    return unmodifiableSet(s);
  }
182692
function (featureStringCommaSeparated) {
  var arrayFeatures = featureStringCommaSeparated
    .split(',')
    .filter(function (x) { return x.length })
    .map(function (x) { return x.replace(/[\*\/]/g, '') }); // Eliminate XSS vuln
  var arrayUnsupportedFeatures = [];
  for (var i = 0; i < arrayFeatures.length; i++) {
    var supportedFeature = true;
    var fullFeature = arrayFeatures[i];
    if (contains(fullFeature, "~")) {
      if (contains(fullFeature, "Intl.~locale")) {
        supportedFeature = checkIntlLocale(window, fullFeature);
      } else {
        console.warn('Feature ' + fullFeature + ' can not be detected because it has not JavaScript API.');
      }
    } else {
      // Get the feature and the container Object
      var featureString = fullFeature.substring(fullFeature.lastIndexOf('.') + 1);
      if (contains(featureString, "@@")) {
        console.warn('Feature ' + featureString + ' can not be detected because it depends on Symbol.');
      } else {
        var objectString = fullFeature.substring(0, fullFeature.lastIndexOf('.'));
        var object = getDescendantProp(window, objectString);
        if (object !== undefined) {
          //if ((object.hasOwnProperty(featureString)) === false) {
          if ((featureString in object) === false) {
            supportedFeature = false;
          }
        } else {
          supportedFeature = false;
        }
      }
    }
    // If the feature is not supported by the browser, then add it to polyfill it
    if (supportedFeature === false) {
      arrayUnsupportedFeatures.push(fullFeature);
    }
  }
  return arrayUnsupportedFeatures;
}
1112617
public static String extractAsString(final Element item, final Class<? extends Annotation> annotationClass, final AnnotationAttributeType attributeName) {
		final Elements elementUtils=BaseProcessor.elementUtils;
		
		final One<String> result = new One<String>();

		extractString(elementUtils, item, annotationClass, attributeName, new OnAttributeFoundListener() {

			@Override
			public void onFound(String value) {
				List<String> list = AnnotationUtility.extractAsArrayOfString(value);

				if (list.size() > 0)
					result.value0 = list.get(0);
				else
					result.value0 = value;							
			}
		});

		return result.value0;
	}
958543
private void parseSettings(I_CmsXmlContentLocation formatterLoc) {

        for (I_CmsXmlContentValueLocation settingLoc : formatterLoc.getSubValues(N_SETTING)) {
            CmsPropertyConfig propConfig = CmsConfigurationReader.parseProperty(m_cms, settingLoc);
            CmsXmlContentProperty property = propConfig.getPropertyData();
            m_settingList.add(property);
        }
    }
992643
public JRecordExtractor<T, float[]> extractWithSubsetSettingsFloat(String settings) {
    return new JRecordExtractor<>(JavaOps.extractWithSubsetSettingsFloat(self, settings));
  }
392309
public static String[] getFeatureAttribute(Annotation annotation) {

        try {

            // only annotations which are annotated with @FeatureAttribute are interesting
            FeatureAttribute details = annotation.annotationType().getAnnotation(FeatureAttribute.class);
            if (details != null) {

                // this is the name of the feature attribute
                String attributeName = details.value();

                // find the method to invoke on the annotation to read the value of the feature attribute
                Method method = annotation.getClass().getMethod(details.annotationAttribute());
                if (method != null) {
                    String attributeValue = method.invoke(annotation).toString();
                    return new String[]{attributeName, attributeValue};
                }

            }

        } catch (NoSuchMethodException e) {
            throw new IllegalStateException(e);
        } catch (SecurityException e) {
            throw new IllegalStateException(e);
        } catch (IllegalAccessException e) {
            throw new IllegalStateException(e);
        } catch (IllegalArgumentException e) {
            throw new IllegalStateException(e);
        } catch (InvocationTargetException e) {
            throw new IllegalStateException(e);
        }

        return null;

    }
606421
private Set<String> getTags(RoxableTest methodAnnotation, RoxableTestClass classAnnotation) {
		Set<String> tags = CollectionHelper.getTags(configuration.getTags(), methodAnnotation, classAnnotation);
		
		if (!tags.contains(DEFAULT_TAG)) {
			tags.add(DEFAULT_TAG);
		}
		
		return tags;
	}
696565
public static Optional<Method> extractSetter(final Class<?> targetClass, final String propertyName, final Class<?> propertyType) {
        
        final String methodName = "set" + Utils.capitalize(propertyName);
        
        Method method;
        try {
            method = targetClass.getMethod(methodName, propertyType);
        } catch (NoSuchMethodException | SecurityException e) {
            return Optional.empty();
        }
        
        method.setAccessible(true);
        
        return Optional.of(method);
    }
66715
private void extractAllFeats(FgExampleList data, FactorTemplateList templates) {
        // Create a "no-op" counter.
        IFgModel counts = new IFgModel() {                        
            @Override
            public void addAfterScaling(FeatureVector fv, double multiplier) { }
            @Override
            public void add(int feat, double addend) { }
        };  
        
        // Loop over all factors in the dataset. 
        for (int i=0; i<data.size(); i++) {
            if (i % 1000 == 0) {
                log.debug("Processing example: " + i);
            }
            LFgExample ex = data.get(i);
            FactorGraph fgLat = MarginalLogLikelihood.getFgLat(ex.getFactorGraph(), ex.getGoldConfig());
            // Create a "no-op" inferencer, which returns arbitrary marginals.
            NoOpInferencer inferencer = new NoOpInferencer(ex.getFactorGraph());   
            for (int a=0; a<ex.getFactorGraph().getNumFactors(); a++) {
                Factor f = fgLat.getFactor(a);
                if (f instanceof ObsFeatureCarrier && f instanceof TemplateFactor) {
                    // For each observation function extractor.
                    int t = templates.getTemplateId((TemplateFactor) f);
                    if (t != -1) {
                        ((ObsFeatureCarrier) f).getObsFeatures();                                      
                    }
                } else {
                    // For each standard factor.  
                    f = ex.getFactorGraph().getFactor(a);
                    if (f instanceof GlobalFactor) {
                        ((GlobalFactor) f).addExpectedPartials(counts, 0, inferencer, a);
                    } else {
                        VarTensor marg = inferencer.getMarginalsForFactorId(a);
                        f.addExpectedPartials(counts, marg, 0);
                    }
                }
            }
        }
    }
640895
@SuppressWarnings("static-method")
	public void getImportedFeatures(List<Class<?>> features) {
		features.add(AtomicIntegerArithmeticExtensions.class);
		features.add(AtomicLongArithmeticExtensions.class);
		features.add(ByteArithmeticExtensions.class);
		features.add(DoubleArithmeticExtensions.class);
		features.add(FloatArithmeticExtensions.class);
		features.add(IntegerArithmeticExtensions.class);
		features.add(LongArithmeticExtensions.class);
		features.add(NumberArithmeticExtensions.class);
		features.add(PrimitiveByteArithmeticExtensions.class);
		features.add(PrimitiveDoubleArithmeticExtensions.class);
		features.add(PrimitiveFloatArithmeticExtensions.class);
		features.add(PrimitiveIntArithmeticExtensions.class);
		features.add(PrimitiveLongArithmeticExtensions.class);
		features.add(PrimitiveShortArithmeticExtensions.class);
		features.add(ShortArithmeticExtensions.class);
	}
392331
public JRecordExtractor<T, FloatNamedSparseArray>
  extractWithSubsetSettingsFloatNamedSparseArray(String settings) {
    return new JRecordExtractor<>(JavaOps.extractWithSubsetSettingsFloatNamedSparseArray(self, settings));
  }
1134058
public JRecordExtractor<T, DoubleSparseArray>
  extractWithSettingsDoubleSparseArray(String settings) {
    return new JRecordExtractor<>(JavaOps.extractWithSettingsDoubleSparseArray(self, settings));
  }
1012328
@SuppressWarnings("static-method")
	public void getImportedFeatures(List<Class<?>> features) {
		features.add(AtomicIntegerComparisonExtensions.class);
		features.add(AtomicLongComparisonExtensions.class);
		features.add(ByteComparisonExtensions.class);
		features.add(DoubleComparisonExtensions.class);
		features.add(FloatComparisonExtensions.class);
		features.add(IntegerComparisonExtensions.class);
		features.add(LongComparisonExtensions.class);
		features.add(NumberComparisonExtensions.class);
		features.add(PrimitiveByteComparisonExtensions.class);
		features.add(PrimitiveDoubleComparisonExtensions.class);
		features.add(PrimitiveFloatComparisonExtensions.class);
		features.add(PrimitiveIntComparisonExtensions.class);
		features.add(PrimitiveLongComparisonExtensions.class);
		features.add(PrimitiveShortComparisonExtensions.class);
		features.add(ShortComparisonExtensions.class);
	}
1044710
public JRecordExtractor<T, LabeledPoint>
  extractWithSettingsLabeledPoint(String settings) {
    return new JRecordExtractor<>(JavaOps.extractWithSettingsLabeledPoint(self, settings));
  }
179769
@Override public <C> BraveSpanContext extract(Format<C> format, C carrier) {
    Extractor<TextMap> extractor = formatToExtractor.get(format);
    if (extractor == null) {
      throw new UnsupportedOperationException(format + " not in " + formatToExtractor.keySet());
    }
    TraceContextOrSamplingFlags extractionResult = extractor.extract((TextMap) carrier);
    return BraveSpanContext.create(extractionResult);
  }