Program: 33012
Project: 33012
Buggy source:
static void addInitialFeatures(Config config,ESIndex index,FeatureList featureList,String[] ids) throws Exception {
  String featureFieldPrefix=config.getString("String_Node_Str");
  Set<String> prefixes=Arrays.stream(featureFieldPrefix.split("String_Node_Str")).map(String::trim).collect(Collectors.toSet());
  Set<String> allFields=index.listAllFields();
  List<String> featureFields=allFields.stream().filter(field -> matchPrefixes(field,prefixes)).collect(Collectors.toList());
  System.out.println("String_Node_Str" + featureFields);
  for (  String field : featureFields) {
    String featureType=index.getFieldType(field);
    if (featureType.equalsIgnoreCase("String_Node_Str")) {
      CategoricalFeatureExpander expander=new CategoricalFeatureExpander();
      expander.setStart(featureList.size());
      expander.setVariableName(field);
      expander.putSetting("String_Node_Str","String_Node_Str");
      Set<String> categories=Collections.newSetFromMap(new ConcurrentHashMap<String,Boolean>());
      Arrays.stream(ids).parallel().forEach(id -> {
        String category=index.getStringField(id,field);
        categories.add(category);
      }
);
      for (      String category : categories) {
        expander.addCategory(category);
      }
      List<CategoricalFeature> group=expander.expand();
      boolean toAdd=true;
      if (config.getBoolean("String_Node_Str")) {
        double threshold=config.getDouble("String_Node_Str");
        int numCategories=group.size();
        if (numCategories > ids.length * threshold) {
          toAdd=false;
          System.out.println("String_Node_Str" + field + "String_Node_Str"+ "String_Node_Str"+ numCategories+ "String_Node_Str");
        }
      }
      if (toAdd) {
        for (        Feature feature : group) {
          featureList.add(feature);
        }
      }
    }
 else {
      Feature feature=new Feature();
      feature.setName(field);
      feature.setIndex(featureList.size());
      feature.getSettings().put("String_Node_Str","String_Node_Str");
      featureList.add(feature);
    }
  }
}

Fixed version (ground truth):
static void addInitialFeatures(Config config,ESIndex index,FeatureList featureList,String[] ids) throws Exception {
  String featureFieldPrefix=config.getString("String_Node_Str");
  Set<String> prefixes=Arrays.stream(featureFieldPrefix.split("String_Node_Str")).map(String::trim).collect(Collectors.toSet());
  Set<String> allFields=index.listAllFields();
  List<String> featureFields=allFields.stream().filter(field -> matchPrefixes(field,prefixes)).collect(Collectors.toList());
  System.out.println("String_Node_Str" + featureFields);
  for (  String field : featureFields) {
    String featureType=index.getFieldType(field);
    if (featureType.equalsIgnoreCase("String_Node_Str")) {
      CategoricalFeatureExpander expander=new CategoricalFeatureExpander();
      expander.setStart(featureList.size());
      expander.setVariableName(field);
      expander.putSetting("String_Node_Str","String_Node_Str");
      Collection<org.elasticsearch.search.aggregations.bucket.terms.Terms.Bucket> buckets=index.termAggregation(field,ids);
      Set<String> categories=buckets.stream().map(Terms.Bucket::getKey).collect(Collectors.toSet());
      for (      String category : categories) {
        expander.addCategory(category);
      }
      List<CategoricalFeature> group=expander.expand();
      boolean toAdd=true;
      if (config.getBoolean("String_Node_Str")) {
        double threshold=config.getDouble("String_Node_Str");
        int numCategories=group.size();
        if (numCategories > ids.length * threshold) {
          toAdd=false;
          System.out.println("String_Node_Str" + field + "String_Node_Str"+ "String_Node_Str"+ numCategories+ "String_Node_Str");
        }
      }
      if (toAdd) {
        for (        Feature feature : group) {
          featureList.add(feature);
        }
      }
    }
 else {
      Feature feature=new Feature();
      feature.setName(field);
      feature.setIndex(featureList.size());
      feature.getSettings().put("String_Node_Str","String_Node_Str");
      featureList.add(feature);
    }
  }
}