Program: 11140
Project: 11140
Buggy source:
/** 
 * <p> Note: c is known to be a letter (from 'A' to 'Z') at this poit.
 */
private void handleDeclaration(char c) throws XMLStreamException {
  String keyw=null;
  mCurrDepth=1;
  try {
    do {
      if (c == 'A') {
        keyw=checkDTDKeyword("String_Node_Str");
        if (keyw == null) {
          mCurrDeclaration="String_Node_Str";
          handleAttlistDecl();
          break;
        }
        keyw="String_Node_Str" + keyw;
      }
 else       if (c == 'E') {
        c=dtdNextFromCurr();
        if (c == 'N') {
          keyw=checkDTDKeyword("String_Node_Str");
          if (keyw == null) {
            mCurrDeclaration="String_Node_Str";
            handleEntityDecl(false);
            break;
          }
          keyw="String_Node_Str" + keyw;
        }
 else         if (c == 'L') {
          keyw=checkDTDKeyword("String_Node_Str");
          if (keyw == null) {
            mCurrDeclaration="String_Node_Str";
            handleElementDecl();
            break;
          }
          keyw="String_Node_Str" + keyw;
        }
 else {
          keyw=readDTDKeyword("String_Node_Str");
        }
      }
 else       if (c == 'N') {
        keyw=checkDTDKeyword("String_Node_Str");
        if (keyw == null) {
          mCurrDeclaration="String_Node_Str";
          handleNotationDecl();
          break;
        }
        keyw="String_Node_Str" + keyw;
      }
 else       if (c == 'T' && mCfgSupportDTDPP) {
        keyw=checkDTDKeyword("String_Node_Str");
        if (keyw == null) {
          mCurrDeclaration="String_Node_Str";
          handleTargetNsDecl();
          break;
        }
        keyw="String_Node_Str" + keyw;
      }
 else {
        keyw=readDTDKeyword(String.valueOf(c));
      }
      _reportBadDirective(keyw);
    }
 while (false);
    if (mInput.getScopeId() > 0) {
      handleGreedyEntityProblem(mInput);
    }
  }
  finally {
    mCurrDepth=0;
    mCurrDeclaration=null;
  }
}

Fixed version (ground truth):
/** 
 * <p> Note: c is known to be a letter (from 'A' to 'Z') at this poit.
 */
private void handleDeclaration(char c) throws XMLStreamException {
  String keyw=null;
  mCurrDepth=1;
  try {
    do {
      if (c == 'A') {
        keyw=checkDTDKeyword("String_Node_Str");
        if (keyw == null) {
          mCurrDeclaration="String_Node_Str";
          handleAttlistDecl();
          break;
        }
        keyw="String_Node_Str" + keyw;
      }
 else       if (c == 'E') {
        c=dtdNextFromCurr();
        if (c == 'N') {
          keyw=checkDTDKeyword("String_Node_Str");
          if (keyw == null) {
            mCurrDeclaration="String_Node_Str";
            handleEntityDecl(false);
            break;
          }
          keyw="String_Node_Str" + keyw;
        }
 else         if (c == 'L') {
          keyw=checkDTDKeyword("String_Node_Str");
          if (keyw == null) {
            mCurrDeclaration="String_Node_Str";
            handleElementDecl();
            break;
          }
          keyw="String_Node_Str" + keyw;
        }
 else {
          keyw=readDTDKeyword("String_Node_Str" + c);
        }
      }
 else       if (c == 'N') {
        keyw=checkDTDKeyword("String_Node_Str");
        if (keyw == null) {
          mCurrDeclaration="String_Node_Str";
          handleNotationDecl();
          break;
        }
        keyw="String_Node_Str" + keyw;
      }
 else       if (c == 'T' && mCfgSupportDTDPP) {
        keyw=checkDTDKeyword("String_Node_Str");
        if (keyw == null) {
          mCurrDeclaration="String_Node_Str";
          handleTargetNsDecl();
          break;
        }
        keyw="String_Node_Str" + keyw;
      }
 else {
        keyw=readDTDKeyword(String.valueOf(c));
      }
      _reportBadDirective(keyw);
    }
 while (false);
    if (mInput.getScopeId() > 0) {
      handleGreedyEntityProblem(mInput);
    }
  }
  finally {
    mCurrDepth=0;
    mCurrDeclaration=null;
  }
}