Program: 15600
Project: 15600
Buggy source:
public void endElement(String nsuri,String localName,String qName) throws TldParsingSAXException {
  if (!stack.peek().equals(qName)) {
    throw new TldParsingSAXException("String_Node_Str" + qName + "String_Node_Str",locator);
  }
  if (stack.size() == 3) {
    if (E_NAME.equals(qName)) {
      if (E_TAG.equals(stack.get(1))) {
        tagNameCData=cDataCollector.toString();
        cDataCollector=null;
      }
 else       if (E_FUNCTION.equals(stack.get(1))) {
        functionNameCData=cDataCollector.toString();
        cDataCollector=null;
      }
    }
 else     if (E_TAG_CLASS_LEGACY.equals(qName) || E_TAG_CLASS.equals(qName)) {
      tagClassCData=cDataCollector.toString();
      cDataCollector=null;
    }
 else     if (E_LISTENER_CLASS.equals(qName)) {
      listenerClassCData=cDataCollector.toString();
      cDataCollector=null;
    }
 else     if (E_FUNCTION_CLASS.equals(qName)) {
      functionClassCData=cDataCollector.toString();
      cDataCollector=null;
    }
 else     if (E_FUNCTION_SIGNATURE.equals(qName)) {
      functionSignatureCData=cDataCollector.toString();
      cDataCollector=null;
    }
  }
 else   if (stack.size() == 2) {
    if (E_TAG.equals(qName)) {
      checkChildElementNotNull(qName,E_NAME,tagNameCData);
      checkChildElementNotNull(qName,E_TAG_CLASS,tagClassCData);
      final Class tagClass=resoveClassFromTLD(tagClassCData,"String_Node_Str",tagNameCData);
      final TemplateModel impl;
      try {
        if (Tag.class.isAssignableFrom(tagClass)) {
          impl=new TagTransformModel(tagClass);
        }
 else {
          impl=new SimpleTagDirectiveModel(tagClass);
        }
      }
 catch (      IntrospectionException e) {
        throw new TldParsingSAXException("String_Node_Str" + tagClassCData,locator,e);
      }
      tagsAndFunctions.put(tagNameCData,impl);
      tagNameCData=null;
      tagClassCData=null;
    }
 else     if (E_FUNCTION.equals(qName) && beansWrapper != null) {
      checkChildElementNotNull(qName,E_FUNCTION_CLASS,functionClassCData);
      checkChildElementNotNull(qName,E_FUNCTION_SIGNATURE,functionSignatureCData);
      checkChildElementNotNull(qName,E_NAME,functionNameCData);
      final Class functionClass=resoveClassFromTLD(functionClassCData,"String_Node_Str",functionNameCData);
      final Method functionMethod;
      try {
        functionMethod=TaglibMethodUtil.getMethodByFunctionSignature(functionClass,functionSignatureCData);
      }
 catch (      Exception e) {
        throw new TldParsingSAXException("String_Node_Str" + StringUtil.jQuote(functionSignatureCData) + "String_Node_Str"+ StringUtil.jQuote(functionClass.getName())+ "String_Node_Str"+ StringUtil.jQuote(functionNameCData)+ "String_Node_Str",locator,e);
      }
      final int modifiers=functionMethod.getModifiers();
      if (!Modifier.isPublic(modifiers) || !Modifier.isStatic(modifiers)) {
        throw new TldParsingSAXException("String_Node_Str" + functionMethod,locator);
      }
      final TemplateMethodModelEx methodModel;
      try {
        methodModel=beansWrapper.wrap(null,functionMethod);
      }
 catch (      Exception e) {
        throw new TldParsingSAXException("String_Node_Str" + functionMethod,locator);
      }
      tagsAndFunctions.put(functionNameCData,methodModel);
      functionNameCData=null;
      functionClassCData=null;
      functionSignatureCData=null;
    }
 else     if (E_LISTENER.equals(qName)) {
      checkChildElementNotNull(qName,E_LISTENER_CLASS,listenerClassCData);
      final Class listenerClass=resoveClassFromTLD(listenerClassCData,E_LISTENER,null);
      final Object listener;
      try {
        listener=listenerClass.newInstance();
      }
 catch (      Exception e) {
        throw new TldParsingSAXException("String_Node_Str" + listenerClassCData,locator,e);
      }
      listeners.add(listener);
      listenerClassCData=null;
    }
  }
  stack.pop();
}

Fixed version (ground truth):
public void endElement(String nsuri,String localName,String qName) throws TldParsingSAXException {
  if (!stack.peek().equals(qName)) {
    throw new TldParsingSAXException("String_Node_Str" + qName + "String_Node_Str",locator);
  }
  if (stack.size() == 3) {
    if (E_NAME.equals(qName)) {
      if (E_TAG.equals(stack.get(1))) {
        tagNameCData=pullCData();
      }
 else       if (E_FUNCTION.equals(stack.get(1))) {
        functionNameCData=pullCData();
      }
    }
 else     if (E_TAG_CLASS_LEGACY.equals(qName) || E_TAG_CLASS.equals(qName)) {
      tagClassCData=pullCData();
    }
 else     if (E_LISTENER_CLASS.equals(qName)) {
      listenerClassCData=pullCData();
    }
 else     if (E_FUNCTION_CLASS.equals(qName)) {
      functionClassCData=pullCData();
    }
 else     if (E_FUNCTION_SIGNATURE.equals(qName)) {
      functionSignatureCData=pullCData();
    }
  }
 else   if (stack.size() == 2) {
    if (E_TAG.equals(qName)) {
      checkChildElementNotNull(qName,E_NAME,tagNameCData);
      checkChildElementNotNull(qName,E_TAG_CLASS,tagClassCData);
      final Class tagClass=resoveClassFromTLD(tagClassCData,"String_Node_Str",tagNameCData);
      final TemplateModel impl;
      try {
        if (Tag.class.isAssignableFrom(tagClass)) {
          impl=new TagTransformModel(tagClass);
        }
 else {
          impl=new SimpleTagDirectiveModel(tagClass);
        }
      }
 catch (      IntrospectionException e) {
        throw new TldParsingSAXException("String_Node_Str" + tagClassCData,locator,e);
      }
      tagsAndFunctions.put(tagNameCData,impl);
      tagNameCData=null;
      tagClassCData=null;
    }
 else     if (E_FUNCTION.equals(qName) && beansWrapper != null) {
      checkChildElementNotNull(qName,E_FUNCTION_CLASS,functionClassCData);
      checkChildElementNotNull(qName,E_FUNCTION_SIGNATURE,functionSignatureCData);
      checkChildElementNotNull(qName,E_NAME,functionNameCData);
      final Class functionClass=resoveClassFromTLD(functionClassCData,"String_Node_Str",functionNameCData);
      final Method functionMethod;
      try {
        functionMethod=TaglibMethodUtil.getMethodByFunctionSignature(functionClass,functionSignatureCData);
      }
 catch (      Exception e) {
        throw new TldParsingSAXException("String_Node_Str" + StringUtil.jQuote(functionSignatureCData) + "String_Node_Str"+ StringUtil.jQuote(functionClass.getName())+ "String_Node_Str"+ StringUtil.jQuote(functionNameCData)+ "String_Node_Str",locator,e);
      }
      final int modifiers=functionMethod.getModifiers();
      if (!Modifier.isPublic(modifiers) || !Modifier.isStatic(modifiers)) {
        throw new TldParsingSAXException("String_Node_Str" + functionMethod,locator);
      }
      final TemplateMethodModelEx methodModel;
      try {
        methodModel=beansWrapper.wrap(null,functionMethod);
      }
 catch (      Exception e) {
        throw new TldParsingSAXException("String_Node_Str" + functionMethod,locator);
      }
      tagsAndFunctions.put(functionNameCData,methodModel);
      functionNameCData=null;
      functionClassCData=null;
      functionSignatureCData=null;
    }
 else     if (E_LISTENER.equals(qName)) {
      checkChildElementNotNull(qName,E_LISTENER_CLASS,listenerClassCData);
      final Class listenerClass=resoveClassFromTLD(listenerClassCData,E_LISTENER,null);
      final Object listener;
      try {
        listener=listenerClass.newInstance();
      }
 catch (      Exception e) {
        throw new TldParsingSAXException("String_Node_Str" + listenerClassCData,locator,e);
      }
      listeners.add(listener);
      listenerClassCData=null;
    }
  }
  stack.pop();
}