Program: 161865
Project: 161865
Buggy source:
@Override public void handleClosingTag(String tagString){
  if (tagString.equals(CorpusXmlTagHelper.DOCUMENT_TAG_NAME)) {
    finishedDocument(currentDocument);
    currentDocument=null;
  }
 else   if (tagString.equals(CorpusXmlTagHelper.TEXT_WITH_NAMED_ENTITIES_TAG_NAME) && (currentDocument != null)) {
    currentDocument.addProperty(new DocumentText(textBuffer.toString()));
    textBuffer.delete(0,textBuffer.length());
    NamedEntitiesInText nes=new NamedEntitiesInText(namedEntities);
    currentDocument.addProperty(nes);
    namedEntities.clear();
  }
 else   if (tagString.equals(CorpusXmlTagHelper.TEXT_PART_TAG_NAME)) {
    textBuffer.append(data);
  }
 else   if (tagString.equals(CorpusXmlTagHelper.NAMED_ENTITY_IN_TEXT_TAG_NAME) || tagString.equals(CorpusXmlTagHelper.SIGNED_NAMED_ENTITY_IN_TEXT_TAG_NAME)) {
    if (currentNamedEntity != null) {
      currentNamedEntity.setLength(data.length());
      namedEntities.add(currentNamedEntity);
      textBuffer.append(data);
    }
  }
 else   if (tagString.equals(CorpusXmlTagHelper.DOCUMENT_CATEGORIES_TAG_NAME)) {
    currentDocument.addProperty(new DocumentMultipleCategories(categories.toArray(new String[categories.size()])));
    categories.clear();
  }
 else   if (tagString.equals(CorpusXmlTagHelper.DOCUMENT_CATEGORIES_SINGLE_CATEGORY_TAG_NAME)) {
    categories.add(data);
  }
 else {
    if (currentDocument != null) {
      Class<? extends ParseableDocumentProperty> propertyClazz=CorpusXmlTagHelper.getParseableDocumentPropertyClassForTagName(tagString);
      if (propertyClazz != null) {
        try {
          ParseableDocumentProperty property=propertyClazz.newInstance();
          property.parseValue(data);
          currentDocument.addProperty(property);
        }
 catch (        Exception e) {
          LOGGER.error("String_Node_Str" + propertyClazz + "String_Node_Str"+ data+ "String_Node_Str",e);
        }
      }
    }
  }
}

Fixed version (ground truth):
@Override public void handleClosingTag(String tagString){
  if (tagString.equals(CorpusXmlTagHelper.DOCUMENT_TAG_NAME)) {
    finishedDocument(currentDocument);
    currentDocument=null;
  }
 else   if (tagString.equals(CorpusXmlTagHelper.TEXT_WITH_NAMED_ENTITIES_TAG_NAME) && (currentDocument != null)) {
    currentDocument.addProperty(new DocumentText(textBuffer.toString()));
    textBuffer.delete(0,textBuffer.length());
    NamedEntitiesInText nes=new NamedEntitiesInText(namedEntities);
    currentDocument.addProperty(nes);
    namedEntities.clear();
  }
 else   if (tagString.equals(CorpusXmlTagHelper.TEXT_PART_TAG_NAME)) {
    textBuffer.append(data);
    data="String_Node_Str";
  }
 else   if (tagString.equals(CorpusXmlTagHelper.NAMED_ENTITY_IN_TEXT_TAG_NAME) || tagString.equals(CorpusXmlTagHelper.SIGNED_NAMED_ENTITY_IN_TEXT_TAG_NAME)) {
    if (currentNamedEntity != null) {
      currentNamedEntity.setLength(data.length());
      namedEntities.add(currentNamedEntity);
      textBuffer.append(data);
      currentNamedEntity=null;
      data="String_Node_Str";
    }
  }
 else   if (tagString.equals(CorpusXmlTagHelper.DOCUMENT_CATEGORIES_TAG_NAME)) {
    currentDocument.addProperty(new DocumentMultipleCategories(categories.toArray(new String[categories.size()])));
    categories.clear();
  }
 else   if (tagString.equals(CorpusXmlTagHelper.DOCUMENT_CATEGORIES_SINGLE_CATEGORY_TAG_NAME)) {
    categories.add(data);
    data="String_Node_Str";
  }
 else {
    if (currentDocument != null) {
      Class<? extends ParseableDocumentProperty> propertyClazz=CorpusXmlTagHelper.getParseableDocumentPropertyClassForTagName(tagString);
      if (propertyClazz != null) {
        try {
          ParseableDocumentProperty property=propertyClazz.newInstance();
          property.parseValue(data);
          data="String_Node_Str";
          currentDocument.addProperty(property);
        }
 catch (        Exception e) {
          LOGGER.error("String_Node_Str" + propertyClazz + "String_Node_Str"+ data+ "String_Node_Str",e);
        }
      }
    }
  }
}