Program: 53369
Project: 53369
Buggy source:
/** 
 * Generate the XML feature descriptor from the TrainingParameters prop file.
 * @param params the properties file
 * @return the XML feature descriptor
 * @throws IOException if input output fails
 */
public static String createXMLFeatureDescriptor(TrainingParameters params) throws IOException {
  Element aggGenerators=new Element("String_Node_Str");
  Document doc=new Document(aggGenerators);
  Element cached=new Element("String_Node_Str");
  Element generators=new Element("String_Node_Str");
  if (Flags.isTokenFeature(params)) {
    setWindow(params);
    Element tokenFeature=new Element("String_Node_Str");
    tokenFeature.setAttribute("String_Node_Str",TokenFeatureGenerator.class.getName());
    Element tokenWindow=new Element("String_Node_Str");
    tokenWindow.setAttribute("String_Node_Str",Integer.toString(leftWindow));
    tokenWindow.setAttribute("String_Node_Str",Integer.toString(rightWindow));
    tokenWindow.addContent(tokenFeature);
    generators.addContent(tokenWindow);
    System.err.println("String_Node_Str" + leftWindow + "String_Node_Str"+ rightWindow);
  }
  if (Flags.isTokenClassFeature(params)) {
    setWindow(params);
    Element tokenClassFeature=new Element("String_Node_Str");
    tokenClassFeature.setAttribute("String_Node_Str",TokenClassFeatureGenerator.class.getName());
    Element tokenClassWindow=new Element("String_Node_Str");
    tokenClassWindow.setAttribute("String_Node_Str",Integer.toString(leftWindow));
    tokenClassWindow.setAttribute("String_Node_Str",Integer.toString(rightWindow));
    tokenClassWindow.addContent(tokenClassFeature);
    generators.addContent(tokenClassWindow);
    System.err.println("String_Node_Str" + leftWindow + "String_Node_Str"+ rightWindow);
  }
  if (Flags.isOutcomePriorFeature(params)) {
    Element outcomePriorFeature=new Element("String_Node_Str");
    outcomePriorFeature.setAttribute("String_Node_Str",OutcomePriorFeatureGenerator.class.getName());
    generators.addContent(outcomePriorFeature);
    System.err.println("String_Node_Str");
  }
  if (Flags.isPreviousMapFeature(params)) {
    Element previousMapFeature=new Element("String_Node_Str");
    previousMapFeature.setAttribute("String_Node_Str",PreviousMapFeatureGenerator.class.getName());
    generators.addContent(previousMapFeature);
    System.err.println("String_Node_Str");
  }
  if (Flags.isSentenceFeature(params)) {
    Element sentenceFeature=new Element("String_Node_Str");
    sentenceFeature.setAttribute("String_Node_Str",SentenceFeatureGenerator.class.getName());
    sentenceFeature.setAttribute("String_Node_Str","String_Node_Str");
    sentenceFeature.setAttribute("String_Node_Str","String_Node_Str");
    generators.addContent(sentenceFeature);
    System.err.println("String_Node_Str");
  }
  if (Flags.isPrefixFeature(params)) {
    Element prefixFeature=new Element("String_Node_Str");
    prefixFeature.setAttribute("String_Node_Str",Prefix34FeatureGenerator.class.getName());
    generators.addContent(prefixFeature);
    System.err.println("String_Node_Str");
  }
  if (Flags.isSuffixFeature(params)) {
    Element suffixFeature=new Element("String_Node_Str");
    suffixFeature.setAttribute("String_Node_Str",SuffixFeatureGenerator.class.getName());
    generators.addContent(suffixFeature);
    System.err.println("String_Node_Str");
  }
  if (Flags.isBigramClassFeature(params)) {
    Element bigramFeature=new Element("String_Node_Str");
    bigramFeature.setAttribute("String_Node_Str",BigramClassFeatureGenerator.class.getName());
    generators.addContent(bigramFeature);
    System.err.println("String_Node_Str");
  }
  if (Flags.isTrigramClassFeature(params)) {
    Element trigramFeature=new Element("String_Node_Str");
    trigramFeature.setAttribute("String_Node_Str",TrigramClassFeatureGenerator.class.getName());
    generators.addContent(trigramFeature);
    System.err.println("String_Node_Str");
  }
  if (Flags.isFourgramClassFeature(params)) {
    Element fourgramFeature=new Element("String_Node_Str");
    fourgramFeature.setAttribute("String_Node_Str",FourgramClassFeatureGenerator.class.getName());
    generators.addContent(fourgramFeature);
    System.err.println("String_Node_Str");
  }
  if (Flags.isFivegramClassFeature(params)) {
    Element fivegramFeature=new Element("String_Node_Str");
    fivegramFeature.setAttribute("String_Node_Str",FivegramClassFeatureGenerator.class.getName());
    generators.addContent(fivegramFeature);
    System.err.println("String_Node_Str");
  }
  if (Flags.isCharNgramClassFeature(params)) {
    setNgramRange(params);
    Element charngramFeature=new Element("String_Node_Str");
    charngramFeature.setAttribute("String_Node_Str",CharacterNgramFeatureGenerator.class.getName());
    charngramFeature.setAttribute("String_Node_Str",Integer.toString(minCharNgram));
    charngramFeature.setAttribute("String_Node_Str",Integer.toString(maxCharNgram));
    generators.addContent(charngramFeature);
    System.err.println("String_Node_Str");
  }
  if (Flags.isDictionaryFeatures(params)) {
    setWindow(params);
    String dictPath=Flags.getDictionaryFeatures(params);
    List<File> fileList=StringUtils.getFilesInDir(new File(dictPath));
    for (    File dictFile : fileList) {
      Element dictFeatures=new Element("String_Node_Str");
      dictFeatures.setAttribute("String_Node_Str",DictionaryFeatureGenerator.class.getName());
      dictFeatures.setAttribute("String_Node_Str",InputOutputUtils.normalizeLexiconName(dictFile.getCanonicalPath()));
      Element dictWindow=new Element("String_Node_Str");
      dictWindow.setAttribute("String_Node_Str",Integer.toString(leftWindow));
      dictWindow.setAttribute("String_Node_Str",Integer.toString(rightWindow));
      dictWindow.addContent(dictFeatures);
      generators.addContent(dictWindow);
    }
    System.err.println("String_Node_Str");
  }
  if (Flags.isBrownFeatures(params)) {
    setWindow(params);
    Element prev2MapFeature=new Element("String_Node_Str");
    prev2MapFeature.setAttribute("String_Node_Str",Prev2MapFeatureGenerator.class.getName());
    generators.addContent(prev2MapFeature);
    Element prevMapTokenFeature=new Element("String_Node_Str");
    prevMapTokenFeature.setAttribute("String_Node_Str",PreviousMapTokenFeatureGenerator.class.getName());
    Element prevMapTokenWindow=new Element("String_Node_Str");
    prevMapTokenWindow.setAttribute("String_Node_Str",Integer.toString(leftWindow));
    prevMapTokenWindow.setAttribute("String_Node_Str",Integer.toString(rightWindow));
    prevMapTokenWindow.addContent(prevMapTokenFeature);
    generators.addContent(prevMapTokenWindow);
    String brownClusterPath=Flags.getBrownFeatures(params);
    List<File> brownClusterFiles=Flags.getClusterLexiconFiles(brownClusterPath);
    for (    File brownClusterFile : brownClusterFiles) {
      Element brownBigramFeatures=new Element("String_Node_Str");
      brownBigramFeatures.setAttribute("String_Node_Str",BrownBigramFeatureGenerator.class.getName());
      brownBigramFeatures.setAttribute("String_Node_Str",InputOutputUtils.normalizeLexiconName(brownClusterFile.getCanonicalPath()));
      generators.addContent(brownBigramFeatures);
      Element brownTokenFeature=new Element("String_Node_Str");
      brownTokenFeature.setAttribute("String_Node_Str",BrownTokenFeatureGenerator.class.getName());
      brownTokenFeature.setAttribute("String_Node_Str",InputOutputUtils.normalizeLexiconName(brownClusterFile.getCanonicalPath()));
      Element brownTokenWindow=new Element("String_Node_Str");
      brownTokenWindow.setAttribute("String_Node_Str",Integer.toString(leftWindow));
      brownTokenWindow.setAttribute("String_Node_Str",Integer.toString(rightWindow));
      brownTokenWindow.addContent(brownTokenFeature);
      generators.addContent(brownTokenWindow);
      Element brownTokenClassFeature=new Element("String_Node_Str");
      brownTokenClassFeature.setAttribute("String_Node_Str",BrownTokenClassFeatureGenerator.class.getName());
      brownTokenClassFeature.setAttribute("String_Node_Str",InputOutputUtils.normalizeLexiconName(brownClusterFile.getCanonicalPath()));
      Element brownTokenClassWindow=new Element("String_Node_Str");
      brownTokenClassWindow.setAttribute("String_Node_Str",Integer.toString(leftWindow));
      brownTokenClassWindow.setAttribute("String_Node_Str",Integer.toString(rightWindow));
      brownTokenClassWindow.addContent(brownTokenClassFeature);
      generators.addContent(brownTokenClassWindow);
    }
    System.err.println("String_Node_Str");
  }
  if (Flags.isClarkFeatures(params)) {
    setWindow(params);
    String clarkClusterPath=Flags.getClarkFeatures(params);
    List<File> clarkClusterFiles=Flags.getClusterLexiconFiles(clarkClusterPath);
    for (    File clarkCluster : clarkClusterFiles) {
      Element clarkFeatures=new Element("String_Node_Str");
      clarkFeatures.setAttribute("String_Node_Str",ClarkFeatureGenerator.class.getName());
      clarkFeatures.setAttribute("String_Node_Str",InputOutputUtils.normalizeLexiconName(clarkCluster.getCanonicalPath()));
      Element clarkWindow=new Element("String_Node_Str");
      clarkWindow.setAttribute("String_Node_Str",Integer.toString(leftWindow));
      clarkWindow.setAttribute("String_Node_Str",Integer.toString(rightWindow));
      clarkWindow.addContent(clarkFeatures);
      generators.addContent(clarkWindow);
    }
    System.err.println("String_Node_Str");
  }
  if (Flags.isWord2VecClusterFeatures(params)) {
    setWindow(params);
    String word2vecClusterPath=Flags.getWord2VecClusterFeatures(params);
    List<File> word2vecClusterFiles=Flags.getClusterLexiconFiles(word2vecClusterPath);
    for (    File word2vecFile : word2vecClusterFiles) {
      Element word2vecClusterFeatures=new Element("String_Node_Str");
      word2vecClusterFeatures.setAttribute("String_Node_Str",Word2VecClusterFeatureGenerator.class.getName());
      word2vecClusterFeatures.setAttribute("String_Node_Str",InputOutputUtils.normalizeLexiconName(word2vecFile.getCanonicalPath()));
      Element word2vecClusterWindow=new Element("String_Node_Str");
      word2vecClusterWindow.setAttribute("String_Node_Str",Integer.toString(leftWindow));
      word2vecClusterWindow.setAttribute("String_Node_Str",Integer.toString(rightWindow));
      word2vecClusterWindow.addContent(word2vecClusterFeatures);
      generators.addContent(word2vecClusterWindow);
    }
    System.err.println("String_Node_Str");
  }
  if (Flags.isPOSFeatures(params)) {
    setWindow(params);
    String posModelPath=Flags.getPOSFeatures(params);
    Element posFeatureElement=new Element("String_Node_Str");
    posFeatureElement.setAttribute("String_Node_Str",POSFeatureGenerator.class.getName());
    posFeatureElement.setAttribute("String_Node_Str",InputOutputUtils.normalizeLexiconName(posModelPath));
    Element posFeatureWindow=new Element("String_Node_Str");
    posFeatureWindow.setAttribute("String_Node_Str",Integer.toString(leftWindow));
    posFeatureWindow.setAttribute("String_Node_Str",Integer.toString(rightWindow));
    posFeatureWindow.addContent(posFeatureElement);
    generators.addContent(posFeatureWindow);
    System.err.println("String_Node_Str");
  }
  if (Flags.isPOSClassFeatures(params)) {
    String posModelPath=Flags.getPOSClassFeatures(params);
    Element posClassFeatureElement=new Element("String_Node_Str");
    posClassFeatureElement.setAttribute("String_Node_Str",POSClassFeatureGenerator.class.getName());
    posClassFeatureElement.setAttribute("String_Node_Str",InputOutputUtils.normalizeLexiconName(posModelPath));
    Element posClassFeatureWindow=new Element("String_Node_Str");
    posClassFeatureWindow.setAttribute("String_Node_Str",Integer.toString(leftWindow));
    posClassFeatureWindow.setAttribute("String_Node_Str",Integer.toString(rightWindow));
    posClassFeatureWindow.addContent(posClassFeatureElement);
    generators.addContent(posClassFeatureWindow);
    System.err.println("String_Node_Str");
  }
  if (Flags.isLemmaFeatures(params)) {
    String lemmaPath=Flags.getLemmaFeatures(params);
    String[] lemmaResources=lemmaPath.split("String_Node_Str");
    Element lemmaClassFeatureElement=new Element("String_Node_Str");
    lemmaClassFeatureElement.setAttribute("String_Node_Str",LemmaFeatureGenerator.class.getName());
    lemmaClassFeatureElement.setAttribute("String_Node_Str",InputOutputUtils.normalizeLexiconName(lemmaResources[0]));
    lemmaClassFeatureElement.setAttribute("String_Node_Str",InputOutputUtils.normalizeLexiconName(lemmaResources[1]));
    Element lemmaClassFeatureWindow=new Element("String_Node_Str");
    lemmaClassFeatureWindow.setAttribute("String_Node_Str",Integer.toString(leftWindow));
    lemmaClassFeatureWindow.setAttribute("String_Node_Str",Integer.toString(rightWindow));
    lemmaClassFeatureWindow.addContent(lemmaClassFeatureElement);
    generators.addContent(lemmaClassFeatureWindow);
    System.err.println("String_Node_Str");
  }
  aggGenerators.addContent(cached);
  cached.addContent(generators);
  XMLOutputter xmlOutput=new XMLOutputter();
  Format format=Format.getPrettyFormat();
  xmlOutput.setFormat(format);
  return xmlOutput.outputString(doc);
}

Fixed version (ground truth):
/** 
 * Generate the XML feature descriptor from the TrainingParameters prop file.
 * @param params the properties file
 * @return the XML feature descriptor
 * @throws IOException if input output fails
 */
public static String createXMLFeatureDescriptor(TrainingParameters params) throws IOException {
  Element aggGenerators=new Element("String_Node_Str");
  Document doc=new Document(aggGenerators);
  Element cached=new Element("String_Node_Str");
  Element generators=new Element("String_Node_Str");
  if (Flags.isTokenFeature(params)) {
    setWindow(params);
    Element tokenFeature=new Element("String_Node_Str");
    tokenFeature.setAttribute("String_Node_Str",TokenFeatureGenerator.class.getName());
    Element tokenWindow=new Element("String_Node_Str");
    tokenWindow.setAttribute("String_Node_Str",Integer.toString(leftWindow));
    tokenWindow.setAttribute("String_Node_Str",Integer.toString(rightWindow));
    tokenWindow.addContent(tokenFeature);
    generators.addContent(tokenWindow);
    System.err.println("String_Node_Str" + leftWindow + "String_Node_Str"+ rightWindow);
  }
  if (Flags.isTokenClassFeature(params)) {
    setWindow(params);
    Element tokenClassFeature=new Element("String_Node_Str");
    tokenClassFeature.setAttribute("String_Node_Str",TokenClassFeatureGenerator.class.getName());
    Element tokenClassWindow=new Element("String_Node_Str");
    tokenClassWindow.setAttribute("String_Node_Str",Integer.toString(leftWindow));
    tokenClassWindow.setAttribute("String_Node_Str",Integer.toString(rightWindow));
    tokenClassWindow.addContent(tokenClassFeature);
    generators.addContent(tokenClassWindow);
    System.err.println("String_Node_Str" + leftWindow + "String_Node_Str"+ rightWindow);
  }
  if (Flags.isOutcomePriorFeature(params)) {
    Element outcomePriorFeature=new Element("String_Node_Str");
    outcomePriorFeature.setAttribute("String_Node_Str",OutcomePriorFeatureGenerator.class.getName());
    generators.addContent(outcomePriorFeature);
    System.err.println("String_Node_Str");
  }
  if (Flags.isPreviousMapFeature(params)) {
    Element previousMapFeature=new Element("String_Node_Str");
    previousMapFeature.setAttribute("String_Node_Str",PreviousMapFeatureGenerator.class.getName());
    generators.addContent(previousMapFeature);
    System.err.println("String_Node_Str");
  }
  if (Flags.isSentenceFeature(params)) {
    Element sentenceFeature=new Element("String_Node_Str");
    sentenceFeature.setAttribute("String_Node_Str",SentenceFeatureGenerator.class.getName());
    sentenceFeature.setAttribute("String_Node_Str","String_Node_Str");
    sentenceFeature.setAttribute("String_Node_Str","String_Node_Str");
    generators.addContent(sentenceFeature);
    System.err.println("String_Node_Str");
  }
  if (Flags.isPrefixFeature(params)) {
    Element prefixFeature=new Element("String_Node_Str");
    prefixFeature.setAttribute("String_Node_Str",Prefix34FeatureGenerator.class.getName());
    generators.addContent(prefixFeature);
    System.err.println("String_Node_Str");
  }
  if (Flags.isSuffixFeature(params)) {
    Element suffixFeature=new Element("String_Node_Str");
    suffixFeature.setAttribute("String_Node_Str",SuffixFeatureGenerator.class.getName());
    generators.addContent(suffixFeature);
    System.err.println("String_Node_Str");
  }
  if (Flags.isBigramClassFeature(params)) {
    Element bigramFeature=new Element("String_Node_Str");
    bigramFeature.setAttribute("String_Node_Str",BigramClassFeatureGenerator.class.getName());
    generators.addContent(bigramFeature);
    System.err.println("String_Node_Str");
  }
  if (Flags.isTrigramClassFeature(params)) {
    Element trigramFeature=new Element("String_Node_Str");
    trigramFeature.setAttribute("String_Node_Str",TrigramClassFeatureGenerator.class.getName());
    generators.addContent(trigramFeature);
    System.err.println("String_Node_Str");
  }
  if (Flags.isFourgramClassFeature(params)) {
    Element fourgramFeature=new Element("String_Node_Str");
    fourgramFeature.setAttribute("String_Node_Str",FourgramClassFeatureGenerator.class.getName());
    generators.addContent(fourgramFeature);
    System.err.println("String_Node_Str");
  }
  if (Flags.isFivegramClassFeature(params)) {
    Element fivegramFeature=new Element("String_Node_Str");
    fivegramFeature.setAttribute("String_Node_Str",FivegramClassFeatureGenerator.class.getName());
    generators.addContent(fivegramFeature);
    System.err.println("String_Node_Str");
  }
  if (Flags.isCharNgramClassFeature(params)) {
    setNgramRange(params);
    Element charngramFeature=new Element("String_Node_Str");
    charngramFeature.setAttribute("String_Node_Str",CharacterNgramFeatureGenerator.class.getName());
    charngramFeature.setAttribute("String_Node_Str",Integer.toString(minCharNgram));
    charngramFeature.setAttribute("String_Node_Str",Integer.toString(maxCharNgram));
    generators.addContent(charngramFeature);
    System.err.println("String_Node_Str");
  }
  if (Flags.isDictionaryFeatures(params)) {
    setWindow(params);
    String dictPath=Flags.getDictionaryFeatures(params);
    List<File> fileList=StringUtils.getFilesInDir(new File(dictPath));
    for (    File dictFile : fileList) {
      Element dictFeatures=new Element("String_Node_Str");
      dictFeatures.setAttribute("String_Node_Str",DictionaryFeatureGenerator.class.getName());
      dictFeatures.setAttribute("String_Node_Str",InputOutputUtils.normalizeLexiconName(dictFile.getCanonicalPath()));
      Element dictWindow=new Element("String_Node_Str");
      dictWindow.setAttribute("String_Node_Str",Integer.toString(leftWindow));
      dictWindow.setAttribute("String_Node_Str",Integer.toString(rightWindow));
      dictWindow.addContent(dictFeatures);
      generators.addContent(dictWindow);
    }
    System.err.println("String_Node_Str");
  }
  if (Flags.isBrownFeatures(params)) {
    setWindow(params);
    Element prev2MapFeature=new Element("String_Node_Str");
    prev2MapFeature.setAttribute("String_Node_Str",Prev2MapFeatureGenerator.class.getName());
    generators.addContent(prev2MapFeature);
    Element prevMapTokenFeature=new Element("String_Node_Str");
    prevMapTokenFeature.setAttribute("String_Node_Str",PreviousMapTokenFeatureGenerator.class.getName());
    Element prevMapTokenWindow=new Element("String_Node_Str");
    prevMapTokenWindow.setAttribute("String_Node_Str",Integer.toString(leftWindow));
    prevMapTokenWindow.setAttribute("String_Node_Str",Integer.toString(rightWindow));
    prevMapTokenWindow.addContent(prevMapTokenFeature);
    generators.addContent(prevMapTokenWindow);
    String brownClusterPath=Flags.getBrownFeatures(params);
    List<File> brownClusterFiles=Flags.getClusterLexiconFiles(brownClusterPath);
    for (    File brownClusterFile : brownClusterFiles) {
      Element brownBigramFeatures=new Element("String_Node_Str");
      brownBigramFeatures.setAttribute("String_Node_Str",BrownBigramFeatureGenerator.class.getName());
      brownBigramFeatures.setAttribute("String_Node_Str",InputOutputUtils.normalizeLexiconName(brownClusterFile.getCanonicalPath()));
      generators.addContent(brownBigramFeatures);
      Element brownTokenFeature=new Element("String_Node_Str");
      brownTokenFeature.setAttribute("String_Node_Str",BrownTokenFeatureGenerator.class.getName());
      brownTokenFeature.setAttribute("String_Node_Str",InputOutputUtils.normalizeLexiconName(brownClusterFile.getCanonicalPath()));
      Element brownTokenWindow=new Element("String_Node_Str");
      brownTokenWindow.setAttribute("String_Node_Str",Integer.toString(leftWindow));
      brownTokenWindow.setAttribute("String_Node_Str",Integer.toString(rightWindow));
      brownTokenWindow.addContent(brownTokenFeature);
      generators.addContent(brownTokenWindow);
      Element brownTokenClassFeature=new Element("String_Node_Str");
      brownTokenClassFeature.setAttribute("String_Node_Str",BrownTokenClassFeatureGenerator.class.getName());
      brownTokenClassFeature.setAttribute("String_Node_Str",InputOutputUtils.normalizeLexiconName(brownClusterFile.getCanonicalPath()));
      Element brownTokenClassWindow=new Element("String_Node_Str");
      brownTokenClassWindow.setAttribute("String_Node_Str",Integer.toString(leftWindow));
      brownTokenClassWindow.setAttribute("String_Node_Str",Integer.toString(rightWindow));
      brownTokenClassWindow.addContent(brownTokenClassFeature);
      generators.addContent(brownTokenClassWindow);
    }
    System.err.println("String_Node_Str");
  }
  if (Flags.isClarkFeatures(params)) {
    setWindow(params);
    String clarkClusterPath=Flags.getClarkFeatures(params);
    List<File> clarkClusterFiles=Flags.getClusterLexiconFiles(clarkClusterPath);
    for (    File clarkCluster : clarkClusterFiles) {
      Element clarkFeatures=new Element("String_Node_Str");
      clarkFeatures.setAttribute("String_Node_Str",ClarkFeatureGenerator.class.getName());
      clarkFeatures.setAttribute("String_Node_Str",InputOutputUtils.normalizeLexiconName(clarkCluster.getCanonicalPath()));
      Element clarkWindow=new Element("String_Node_Str");
      clarkWindow.setAttribute("String_Node_Str",Integer.toString(leftWindow));
      clarkWindow.setAttribute("String_Node_Str",Integer.toString(rightWindow));
      clarkWindow.addContent(clarkFeatures);
      generators.addContent(clarkWindow);
    }
    System.err.println("String_Node_Str");
  }
  if (Flags.isWord2VecClusterFeatures(params)) {
    setWindow(params);
    String word2vecClusterPath=Flags.getWord2VecClusterFeatures(params);
    List<File> word2vecClusterFiles=Flags.getClusterLexiconFiles(word2vecClusterPath);
    for (    File word2vecFile : word2vecClusterFiles) {
      Element word2vecClusterFeatures=new Element("String_Node_Str");
      word2vecClusterFeatures.setAttribute("String_Node_Str",Word2VecClusterFeatureGenerator.class.getName());
      word2vecClusterFeatures.setAttribute("String_Node_Str",InputOutputUtils.normalizeLexiconName(word2vecFile.getCanonicalPath()));
      Element word2vecClusterWindow=new Element("String_Node_Str");
      word2vecClusterWindow.setAttribute("String_Node_Str",Integer.toString(leftWindow));
      word2vecClusterWindow.setAttribute("String_Node_Str",Integer.toString(rightWindow));
      word2vecClusterWindow.addContent(word2vecClusterFeatures);
      generators.addContent(word2vecClusterWindow);
    }
    System.err.println("String_Node_Str");
  }
  if (Flags.isPOSFeatures(params)) {
    setWindow(params);
    String posModelPath=Flags.getPOSFeatures(params);
    Element posFeatureElement=new Element("String_Node_Str");
    posFeatureElement.setAttribute("String_Node_Str",POSFeatureGenerator.class.getName());
    posFeatureElement.setAttribute("String_Node_Str",InputOutputUtils.normalizeLexiconName(posModelPath));
    Element posFeatureWindow=new Element("String_Node_Str");
    posFeatureWindow.setAttribute("String_Node_Str",Integer.toString(leftWindow));
    posFeatureWindow.setAttribute("String_Node_Str",Integer.toString(rightWindow));
    posFeatureWindow.addContent(posFeatureElement);
    generators.addContent(posFeatureWindow);
    System.err.println("String_Node_Str");
  }
  if (Flags.isPOSClassFeatures(params)) {
    leftWindow=1;
    rightWindow=1;
    String posModelPath=Flags.getPOSClassFeatures(params);
    Element posClassFeatureElement=new Element("String_Node_Str");
    posClassFeatureElement.setAttribute("String_Node_Str",POSClassFeatureGenerator.class.getName());
    posClassFeatureElement.setAttribute("String_Node_Str",InputOutputUtils.normalizeLexiconName(posModelPath));
    Element posClassFeatureWindow=new Element("String_Node_Str");
    posClassFeatureWindow.setAttribute("String_Node_Str",Integer.toString(leftWindow));
    posClassFeatureWindow.setAttribute("String_Node_Str",Integer.toString(rightWindow));
    posClassFeatureWindow.addContent(posClassFeatureElement);
    generators.addContent(posClassFeatureWindow);
    System.err.println("String_Node_Str");
  }
  if (Flags.isLemmaFeatures(params)) {
    String lemmaPath=Flags.getLemmaFeatures(params);
    String[] lemmaResources=lemmaPath.split("String_Node_Str");
    Element lemmaClassFeatureElement=new Element("String_Node_Str");
    lemmaClassFeatureElement.setAttribute("String_Node_Str",LemmaFeatureGenerator.class.getName());
    lemmaClassFeatureElement.setAttribute("String_Node_Str",InputOutputUtils.normalizeLexiconName(lemmaResources[0]));
    lemmaClassFeatureElement.setAttribute("String_Node_Str",InputOutputUtils.normalizeLexiconName(lemmaResources[1]));
    Element lemmaClassFeatureWindow=new Element("String_Node_Str");
    lemmaClassFeatureWindow.setAttribute("String_Node_Str",Integer.toString(leftWindow));
    lemmaClassFeatureWindow.setAttribute("String_Node_Str",Integer.toString(rightWindow));
    lemmaClassFeatureWindow.addContent(lemmaClassFeatureElement);
    generators.addContent(lemmaClassFeatureWindow);
    System.err.println("String_Node_Str");
  }
  aggGenerators.addContent(cached);
  cached.addContent(generators);
  XMLOutputter xmlOutput=new XMLOutputter();
  Format format=Format.getPrettyFormat();
  xmlOutput.setFormat(format);
  return xmlOutput.outputString(doc);
}