Program: 29984
Project: 29984
Buggy source:
/** 
 * Scan the content following the named tag, attaching it to the context.
 * @param x       The XmlInputReader containing the source string.
 * @param context The XmlInputObject that will include the new material.
 * @param name    The tag name.
 * @return true if the close tag is processed.
 * @throws InputException
 */
private static boolean parse(XmlInputReader reader,XmlInputObject context,String name) throws InputException {
  char character;
  int i;
  String n;
  XmlInputObject subContext;
  String string;
  Object token;
  token=reader.nextToken();
  if (token == BANG) {
    character=reader.next();
    if (character == '-') {
      if (reader.next() == '-') {
        reader.skipPast("String_Node_Str");
        return false;
      }
      reader.back();
    }
 else     if (character == '[') {
      token=reader.nextToken();
      if (token.equals("String_Node_Str")) {
        if (reader.next() == '[') {
          string=reader.nextCDATA();
          if (string.length() > 0) {
            context.put("String_Node_Str",string);
          }
          return false;
        }
      }
      throw reader.error("String_Node_Str");
    }
    i=1;
    do {
      token=reader.nextMeta();
      if (token == null) {
        throw reader.error("String_Node_Str");
      }
 else       if (token == LT) {
        i+=1;
      }
 else       if (token == GT) {
        i-=1;
      }
    }
 while (i > 0);
    return false;
  }
 else   if (token == QUEST) {
    reader.skipPast("String_Node_Str");
    return false;
  }
 else   if (token == SLASH) {
    token=reader.nextToken();
    if (name == null) {
      throw reader.error("String_Node_Str" + token);
    }
    if (!token.equals(name)) {
      throw reader.error("String_Node_Str" + name + "String_Node_Str"+ token);
    }
    if (reader.nextToken() != GT) {
      throw reader.error("String_Node_Str");
    }
    return true;
  }
 else   if (token instanceof Character) {
    throw reader.error("String_Node_Str");
  }
 else {
    n=(String)token;
    token=null;
    subContext=new XmlInputObject(reader);
    for (; ; ) {
      if (token == null) {
        token=reader.nextToken();
      }
      if (token instanceof String) {
        string=(String)token;
        token=reader.nextToken();
        if (token == EQ) {
          token=reader.nextToken();
          if (!(token instanceof String)) {
            throw reader.error("String_Node_Str");
          }
          subContext.put(string,XmlInputObject.stringToValue((String)token));
          token=null;
        }
 else {
          subContext.put(string,"String_Node_Str");
        }
      }
 else       if (token == SLASH) {
        if (reader.nextToken() != GT) {
          throw reader.error("String_Node_Str");
        }
        context.putMap(n,subContext.getMap());
        return false;
      }
 else       if (token == GT) {
        for (; ; ) {
          token=reader.nextContent();
          if (token == null) {
            if (n != null) {
              throw reader.error("String_Node_Str" + n);
            }
            return false;
          }
 else           if (token instanceof String) {
            string=(String)token;
            if (string.length() > 0) {
              subContext.put("String_Node_Str",XmlInputObject.stringToValue(string));
            }
          }
 else           if (token == LT) {
            if (parse(reader,subContext,n)) {
              if (subContext.length() == 0) {
                context.put(n,"String_Node_Str");
              }
 else               if (subContext.length() == 1 && subContext.get("String_Node_Str") != null) {
                context.put(n,subContext.get("String_Node_Str"));
              }
 else {
                context.putMap(n,subContext.getMap());
              }
              return false;
            }
          }
        }
      }
 else {
        throw reader.error("String_Node_Str");
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Scan the content following the named tag, attaching it to the context.
 * @param x       The XmlInputReader containing the source string.
 * @param context The XmlInputObject that will include the new material.
 * @param name    The tag name.
 * @return true if the close tag is processed.
 * @throws InputException
 */
private static boolean parse(XmlInputReader reader,XmlInputObject context,String name) throws InputException {
  char character;
  int i;
  String n;
  XmlInputObject subContext;
  String string;
  Object token;
  token=reader.nextToken();
  if (BANG.equals(token)) {
    character=reader.next();
    if (character == '-') {
      if (reader.next() == '-') {
        reader.skipPast("String_Node_Str");
        return false;
      }
      reader.back();
    }
 else     if (character == '[') {
      token=reader.nextToken();
      if ("String_Node_Str".equals(token)) {
        if (reader.next() == '[') {
          string=reader.nextCDATA();
          if (string.length() > 0) {
            context.put("String_Node_Str",string);
          }
          return false;
        }
      }
      throw reader.error("String_Node_Str");
    }
    i=1;
    do {
      token=reader.nextMeta();
      if (token == null) {
        throw reader.error("String_Node_Str");
      }
 else       if (LT.equals(token)) {
        i+=1;
      }
 else       if (GT.equals(token)) {
        i-=1;
      }
    }
 while (i > 0);
    return false;
  }
 else   if (QUEST.equals(token)) {
    reader.skipPast("String_Node_Str");
    return false;
  }
 else   if (SLASH.equals(token)) {
    token=reader.nextToken();
    if (name == null) {
      throw reader.error("String_Node_Str" + token);
    }
    if (!name.equals(token)) {
      throw reader.error("String_Node_Str" + name + "String_Node_Str"+ token);
    }
    if (!GT.equals(reader.nextToken())) {
      throw reader.error("String_Node_Str");
    }
    return true;
  }
 else   if (token instanceof Character) {
    throw reader.error("String_Node_Str");
  }
 else {
    n=(String)token;
    token=null;
    subContext=new XmlInputObject(reader);
    for (; ; ) {
      if (token == null) {
        token=reader.nextToken();
      }
      if (token instanceof String) {
        string=(String)token;
        token=reader.nextToken();
        if (EQ.equals(token)) {
          token=reader.nextToken();
          if (!(token instanceof String)) {
            throw reader.error("String_Node_Str");
          }
          subContext.put(string,XmlInputObject.stringToValue((String)token));
          token=null;
        }
 else {
          subContext.put(string,"String_Node_Str");
        }
      }
 else       if (SLASH.equals(token)) {
        if (!reader.nextToken().equals(GT)) {
          throw reader.error("String_Node_Str");
        }
        context.putMap(n,subContext.getMap());
        return false;
      }
 else       if (GT.equals(token)) {
        for (; ; ) {
          token=reader.nextContent();
          if (token == null) {
            if (n != null) {
              throw reader.error("String_Node_Str" + n);
            }
            return false;
          }
 else           if (token instanceof String) {
            string=(String)token;
            if (string.length() > 0) {
              subContext.put("String_Node_Str",XmlInputObject.stringToValue(string));
            }
          }
 else           if (LT.equals(token)) {
            if (parse(reader,subContext,n)) {
              if (subContext.length() == 0) {
                context.put(n,"String_Node_Str");
              }
 else               if (subContext.length() == 1 && subContext.get("String_Node_Str") != null) {
                context.put(n,subContext.get("String_Node_Str"));
              }
 else {
                context.putMap(n,subContext.getMap());
              }
              return false;
            }
          }
        }
      }
 else {
        throw reader.error("String_Node_Str");
      }
    }
  }
}