Program: 22692
Project: 22692
Buggy source:
/** 
 * Parses a given list of options. <p/> <p/> <!-- options-start --> Valid options are: <p/> <p/> <pre> -I &lt;number of trees&gt; Number of trees to build.</pre> <p/> <pre> -K &lt;number of features&gt; Number of features to consider (&lt;1=int(logM+1)).</pre> <p/> <pre> -S Seed for random number generator. (default 1)</pre> <p/> <pre> -depth &lt;num&gt; The maximum depth of the trees, 0 for unlimited. (default 0)</pre> <p/> <pre> -threads Number of simultaneous threads to use. (default 0 = autodetect number of available cores)</pre> <p/> <pre> -import Compute and output RF feature importances (slow).</pre> <p/> <pre> -D If set, classifier is run in debug mode and may output additional info to the console</pre> <p/> <!-- options-end -->
 * @param options the list of options as an array of strings
 * @throws Exception if an option is not supported
 */
public void setOptions(String[] options) throws Exception {
  String tmpStr;
  tmpStr=Utils.getOption('I',options);
  if (tmpStr.length() != 0) {
    m_numTrees=Integer.parseInt(tmpStr);
  }
 else {
    m_numTrees=10;
  }
  tmpStr=Utils.getOption('K',options);
  if (tmpStr.length() != 0) {
    m_numFeatures=Integer.parseInt(tmpStr);
  }
 else {
    m_numFeatures=0;
  }
  tmpStr=Utils.getOption('S',options);
  if (tmpStr.length() != 0) {
    setSeed(Integer.parseInt(tmpStr));
  }
 else {
    setSeed(1);
  }
  tmpStr=Utils.getOption("String_Node_Str",options);
  if (tmpStr.length() != 0) {
    setMaxDepth(Integer.parseInt(tmpStr));
  }
 else {
    setMaxDepth(0);
  }
  tmpStr=Utils.getOption("String_Node_Str",options);
  if (tmpStr.length() != 0) {
    setNumThreads(Integer.parseInt(tmpStr));
  }
 else {
    setNumThreads(0);
  }
  setComputeImportances(Utils.getFlag("String_Node_Str",options));
  super.setOptions(options);
  Utils.checkForRemainingOptions(options);
}

Fixed version (ground truth):
/** 
 * Parses a given list of options. <!-- options-start --> <p> Valid options are: </p> <pre> -I &lt;number of trees&gt; Number of trees to build.</pre> <pre> -K &lt;number of features&gt; Number of features to consider (&lt;1=int(logM+1)).</pre> <pre> -S Seed for random number generator. (default 1)</pre> <pre> -depth &lt;num&gt; The maximum depth of the trees, 0 for unlimited. (default 0)</pre> <pre> -threads Number of simultaneous threads to use. (default 0 = autodetect number of available cores)</pre> <pre> -import Compute and output RF feature importances (slow).</pre> <pre> -D If set, classifier is run in debug mode and may output additional info to the console</pre> <!-- options-end -->
 * @param options the list of options as an array of strings
 * @throws Exception if an option is not supported
 */
public void setOptions(String[] options) throws Exception {
  String tmpStr;
  tmpStr=Utils.getOption('I',options);
  if (tmpStr.length() != 0) {
    m_numTrees=Integer.parseInt(tmpStr);
  }
 else {
    m_numTrees=10;
  }
  tmpStr=Utils.getOption('K',options);
  if (tmpStr.length() != 0) {
    m_numFeatures=Integer.parseInt(tmpStr);
  }
 else {
    m_numFeatures=0;
  }
  tmpStr=Utils.getOption('S',options);
  if (tmpStr.length() != 0) {
    setSeed(Integer.parseInt(tmpStr));
  }
 else {
    setSeed(1);
  }
  tmpStr=Utils.getOption("String_Node_Str",options);
  if (tmpStr.length() != 0) {
    setMaxDepth(Integer.parseInt(tmpStr));
  }
 else {
    setMaxDepth(0);
  }
  tmpStr=Utils.getOption("String_Node_Str",options);
  if (tmpStr.length() != 0) {
    setNumThreads(Integer.parseInt(tmpStr));
  }
 else {
    setNumThreads(0);
  }
  setComputeImportances(Utils.getFlag("String_Node_Str",options));
  super.setOptions(options);
  Utils.checkForRemainingOptions(options);
}