Program: 53391
Project: 53391
Buggy source:
/** 
 * Creates the list of features to be passed to the createFeatureGenerator(params) method. Every programatic use of ixa-pipe-nerc will need to implement/use a function like this to train a model.
 * @param params the training parameters
 * @return the list of {@code AdaptiveFeatureGenerator}s
 */
private final List<AdaptiveFeatureGenerator> createFeatureList(TrainingParameters params){
  List<AdaptiveFeatureGenerator> featureList=new ArrayList<AdaptiveFeatureGenerator>();
  int leftWindow=getWindowRange(params).get(0);
  int rightWindow=getWindowRange(params).get(1);
  String tokenParam=InputOutputUtils.getTokenFeatures(params);
  if (tokenParam.equalsIgnoreCase("String_Node_Str")) {
    addWindowTokenFeatures(leftWindow,rightWindow,featureList);
    System.err.println("String_Node_Str" + leftWindow + "String_Node_Str"+ rightWindow);
  }
  String tokenClassParam=InputOutputUtils.getTokenClassFeatures(params);
  if (tokenClassParam.equalsIgnoreCase("String_Node_Str")) {
    addWindowTokenClassFeatures(leftWindow,rightWindow,featureList);
    System.err.println("String_Node_Str" + leftWindow + "String_Node_Str"+ rightWindow);
  }
  String outcomePriorParam=InputOutputUtils.getOutcomePriorFeatures(params);
  if (outcomePriorParam.equalsIgnoreCase("String_Node_Str")) {
    addOutcomePriorFeatures(featureList);
    System.err.println("String_Node_Str");
  }
  String previousMapParam=InputOutputUtils.getPreviousMapFeatures(params);
  if (previousMapParam.equalsIgnoreCase("String_Node_Str")) {
    addPreviousMapFeatures(leftWindow,rightWindow,featureList);
    System.err.println("String_Node_Str");
  }
  String sentenceParam=InputOutputUtils.getSentenceFeatures(params);
  if (sentenceParam.equalsIgnoreCase("String_Node_Str")) {
    addSentenceFeatures(featureList);
    System.err.println("String_Node_Str");
  }
  String preffixParam=InputOutputUtils.getPreffixFeatures(params);
  if (preffixParam.equalsIgnoreCase("String_Node_Str")) {
    addPrefixFeatures(featureList);
    System.err.println("String_Node_Str");
  }
  String suffixParam=InputOutputUtils.getSuffixFeatures(params);
  if (suffixParam.equalsIgnoreCase("String_Node_Str")) {
    addSuffixFeatures(featureList);
    System.err.println("String_Node_Str");
  }
  String bigramClassParam=InputOutputUtils.getBigramClassFeatures(params);
  if (bigramClassParam.equalsIgnoreCase("String_Node_Str")) {
    addBigramClassFeatures(featureList);
    System.err.println("String_Node_Str");
  }
  String trigramClassParam=InputOutputUtils.getTrigramClassFeatures(params);
  if (trigramClassParam.equalsIgnoreCase("String_Node_Str")) {
    addTrigramClassFeatures(featureList);
    System.err.println("String_Node_Str");
  }
  String fourgramClassParam=InputOutputUtils.getFourgramClassFeatures(params);
  if (fourgramClassParam.equalsIgnoreCase("String_Node_Str")) {
    addFourgramClassFeatures(featureList);
    System.err.println("String_Node_Str");
  }
  String fivegramClassParam=InputOutputUtils.getFivegramClassFeatures(params);
  if (fivegramClassParam.equalsIgnoreCase("String_Node_Str")) {
    addFivegramClassFeatures(featureList);
    System.err.println("String_Node_Str");
  }
  String charNgramParam=InputOutputUtils.getCharNgramFeatures(params);
  if (charNgramParam.equalsIgnoreCase("String_Node_Str")) {
    int minLength=getNgramRange(params).get(0);
    int maxLength=getNgramRange(params).get(1);
    addCharNgramFeatures(minLength,maxLength,featureList);
    System.err.println("String_Node_Str" + minLength + "String_Node_Str"+ maxLength);
  }
  String dictionaryParam=InputOutputUtils.getDictionaryFeatures(params);
  if (dictionaryParam.equalsIgnoreCase("String_Node_Str")) {
    System.err.println("String_Node_Str");
    String dictPath=InputOutputUtils.getDictPath(params);
    if (dictionaries == null) {
      dictionaries=new Dictionaries(dictPath);
    }
    addDictionaryFeatures(leftWindow,rightWindow,featureList);
  }
  String distSimParam=InputOutputUtils.getClarkFeatures(params);
  if (distSimParam.equalsIgnoreCase("String_Node_Str")) {
    System.err.println("String_Node_Str");
    String distSimPath=InputOutputUtils.getClarkPath(params);
    if (clarkCluster == null) {
      clarkCluster=new ClarkCluster(distSimPath);
    }
    addClarkFeatures(leftWindow,rightWindow,featureList);
  }
  String brownParam=InputOutputUtils.getBrownFeatures(params);
  if (brownParam.equalsIgnoreCase("String_Node_Str")) {
    System.err.println("String_Node_Str");
    brownLexicon=setBrownResources(params,brownParam);
    addBrownFeatures(leftWindow,rightWindow,featureList);
  }
  String word2vecClusterParam=InputOutputUtils.getWord2VecClusterFeatures(params);
  if (word2vecClusterParam.equalsIgnoreCase("String_Node_Str")) {
    System.err.println("String_Node_Str");
    String word2vecClusterPath=InputOutputUtils.getWord2VecClusterPath(params);
    if (word2vecCluster == null) {
      word2vecCluster=new Word2VecCluster(word2vecClusterPath);
    }
    addWord2VecClusterFeatures(leftWindow,rightWindow,featureList);
  }
  return featureList;
}

Fixed version (ground truth):
/** 
 * Creates the list of features to be passed to the createFeatureGenerator(params) method. Every programatic use of ixa-pipe-nerc will need to implement/use a function like this to train a model.
 * @param params the training parameters
 * @return the list of {@code AdaptiveFeatureGenerator}s
 */
private final List<AdaptiveFeatureGenerator> createFeatureList(TrainingParameters params){
  List<AdaptiveFeatureGenerator> featureList=new ArrayList<AdaptiveFeatureGenerator>();
  int leftWindow=getWindowRange(params).get(0);
  int rightWindow=getWindowRange(params).get(1);
  String tokenParam=InputOutputUtils.getTokenFeatures(params);
  if (tokenParam.equalsIgnoreCase("String_Node_Str")) {
    addWindowTokenFeatures(leftWindow,rightWindow,featureList);
    System.err.println("String_Node_Str" + leftWindow + "String_Node_Str"+ rightWindow);
  }
  String tokenClassParam=InputOutputUtils.getTokenClassFeatures(params);
  if (tokenClassParam.equalsIgnoreCase("String_Node_Str")) {
    addWindowTokenClassFeatures(leftWindow,rightWindow,featureList);
    System.err.println("String_Node_Str" + leftWindow + "String_Node_Str"+ rightWindow);
  }
  String outcomePriorParam=InputOutputUtils.getOutcomePriorFeatures(params);
  if (outcomePriorParam.equalsIgnoreCase("String_Node_Str")) {
    addOutcomePriorFeatures(featureList);
    System.err.println("String_Node_Str");
  }
  String previousMapParam=InputOutputUtils.getPreviousMapFeatures(params);
  if (previousMapParam.equalsIgnoreCase("String_Node_Str")) {
    addPreviousMapFeatures(leftWindow,rightWindow,featureList);
    System.err.println("String_Node_Str");
  }
  String sentenceParam=InputOutputUtils.getSentenceFeatures(params);
  if (sentenceParam.equalsIgnoreCase("String_Node_Str")) {
    addSentenceFeatures(featureList);
    System.err.println("String_Node_Str");
  }
  String preffixParam=InputOutputUtils.getPreffixFeatures(params);
  if (preffixParam.equalsIgnoreCase("String_Node_Str")) {
    addPrefixFeatures(featureList);
    System.err.println("String_Node_Str");
  }
  String suffixParam=InputOutputUtils.getSuffixFeatures(params);
  if (suffixParam.equalsIgnoreCase("String_Node_Str")) {
    addSuffixFeatures(featureList);
    System.err.println("String_Node_Str");
  }
  String bigramClassParam=InputOutputUtils.getBigramClassFeatures(params);
  if (bigramClassParam.equalsIgnoreCase("String_Node_Str")) {
    addBigramClassFeatures(featureList);
    System.err.println("String_Node_Str");
  }
  String trigramClassParam=InputOutputUtils.getTrigramClassFeatures(params);
  if (trigramClassParam.equalsIgnoreCase("String_Node_Str")) {
    addTrigramClassFeatures(featureList);
    System.err.println("String_Node_Str");
  }
  String fourgramClassParam=InputOutputUtils.getFourgramClassFeatures(params);
  if (fourgramClassParam.equalsIgnoreCase("String_Node_Str")) {
    addFourgramClassFeatures(featureList);
    System.err.println("String_Node_Str");
  }
  String fivegramClassParam=InputOutputUtils.getFivegramClassFeatures(params);
  if (fivegramClassParam.equalsIgnoreCase("String_Node_Str")) {
    addFivegramClassFeatures(featureList);
    System.err.println("String_Node_Str");
  }
  String charNgramParam=InputOutputUtils.getCharNgramFeatures(params);
  if (charNgramParam.equalsIgnoreCase("String_Node_Str")) {
    int minLength=getNgramRange(params).get(0);
    int maxLength=getNgramRange(params).get(1);
    addCharNgramFeatures(minLength,maxLength,featureList);
    System.err.println("String_Node_Str" + minLength + "String_Node_Str"+ maxLength);
  }
  String dictionaryParam=InputOutputUtils.getDictionaryFeatures(params);
  if (dictionaryParam.equalsIgnoreCase("String_Node_Str")) {
    System.err.println("String_Node_Str");
    String dictPath=InputOutputUtils.getDictPath(params);
    if (dictionaries == null) {
      dictionaries=new Dictionaries(dictPath);
    }
    addDictionaryFeatures(featureList);
  }
  String brownParam=InputOutputUtils.getBrownFeatures(params);
  if (brownParam.equalsIgnoreCase("String_Node_Str")) {
    System.err.println("String_Node_Str");
    brownLexicon=setBrownResources(params,brownParam);
    addBrownFeatures(featureList);
  }
  String clarkParam=InputOutputUtils.getClarkFeatures(params);
  if (clarkParam.equalsIgnoreCase("String_Node_Str")) {
    System.err.println("String_Node_Str");
    String clarkPath=InputOutputUtils.getClarkPath(params);
    if (clarkCluster == null) {
      clarkCluster=new ClarkCluster(clarkPath);
    }
    addClarkFeatures(featureList);
  }
  String word2vecClusterParam=InputOutputUtils.getWord2VecClusterFeatures(params);
  if (word2vecClusterParam.equalsIgnoreCase("String_Node_Str")) {
    System.err.println("String_Node_Str");
    String word2vecClusterPath=InputOutputUtils.getWord2VecClusterPath(params);
    if (word2vecCluster == null) {
      word2vecCluster=new Word2VecCluster(word2vecClusterPath);
    }
    addWord2VecClusterFeatures(featureList);
  }
  return featureList;
}