Program: 81312
Project: 81312
Buggy source:
private void createDeprecationFile(Map<String,IndexerDataObject> completeMap) throws OutputFormatterException {
  Map<IndexerType,String> deprecatedTypes=new TreeMap<IndexerType,String>();
  Map<IndexerElementHolder,String> deprecatedElements=new TreeMap<IndexerElementHolder,String>();
  Map<IndexerOperationHolder,String> deprecatedOperations=new TreeMap<IndexerOperationHolder,String>();
  Map<IndexerEnumValueElements,String> deprecatedEnums=new TreeMap<IndexerEnumValueElements,String>();
  for (  Map.Entry<String,IndexerDataObject> entry : completeMap.entrySet()) {
    List<IndexerBaseDataObject> data=entry.getValue().getDataObjects();
    Collections.sort(data);
    for (    IndexerBaseDataObject dataObj : data) {
      if (dataObj instanceof IndexerType) {
        StringBuffer depreDetails=AnnotationsHelper.processDeprication(((IndexerType)dataObj).getType().getAnnotations());
        if (depreDetails != null) {
          deprecatedTypes.put(((IndexerType)dataObj),depreDetails.toString());
        }
      }
      if (dataObj instanceof IndexerElementHolder) {
        StringBuffer depreDetails=AnnotationsHelper.processDeprication(((IndexerElementHolder)dataObj).getElement().getAnnotationInfo());
        if (depreDetails != null) {
          deprecatedElements.put(((IndexerElementHolder)dataObj),depreDetails.toString());
        }
      }
      if (dataObj instanceof IndexerOperationHolder) {
        StringBuffer depreDetails=AnnotationsHelper.processDeprication(((IndexerOperationHolder)dataObj).getOperation().getAnnotations());
        if (depreDetails == null) {
          OperationHolder oper=((IndexerOperationHolder)dataObj).getOperation();
          for (          Element input : oper.getInputTypes()) {
            depreDetails=AnnotationsHelper.processDeprication(input.getAnnotationInfo());
          }
          if (depreDetails == null) {
            for (            Element input : oper.getOutputTypes()) {
              depreDetails=AnnotationsHelper.processDeprication(input.getAnnotationInfo());
            }
          }
        }
        if (depreDetails != null) {
          deprecatedOperations.put(((IndexerOperationHolder)dataObj),depreDetails.toString());
        }
      }
      if (dataObj instanceof IndexerEnumValueElements) {
        StringBuffer depreDetails=AnnotationsHelper.processDeprication(((IndexerEnumValueElements)dataObj).getEnumElem().getAnnotations());
        if (depreDetails != null) {
          deprecatedEnums.put(((IndexerEnumValueElements)dataObj),depreDetails.toString());
        }
      }
    }
  }
  StringBuffer html=new StringBuffer();
  html.append(HtmlUtils.getStartTags("String_Node_Str",null));
  buildHeader(html,false,false,null,"String_Node_Str",true,null);
  html.append(getTextInDiv("String_Node_Str","String_Node_Str"));
  html.append(Constants.HTML_BR);
  if (!(deprecatedTypes.isEmpty() && deprecatedElements.isEmpty() && deprecatedEnums.isEmpty()&& deprecatedOperations.isEmpty())) {
    if (!deprecatedOperations.isEmpty()) {
      html.append(getTableTagWithStyle("String_Node_Str"));
      html.append(getTableRowTagWithStyle("String_Node_Str"));
      html.append("String_Node_Str");
      html.append("String_Node_Str");
      html.append(Constants.HTML_TABLE_TH_END);
      html.append(Constants.HTML_TABLE_TR_END);
      for (      Map.Entry<IndexerOperationHolder,String> entry : deprecatedOperations.entrySet()) {
        IndexerOperationHolder op=entry.getKey();
        html.append(getTableRowTagWithStyle("String_Node_Str"));
        html.append(getTableDataTagWithStyle("String_Node_Str"));
        html.append("String_Node_Str" + op.getPackageName() + op.getBaseName()+ Constants.DOT_HTML+ "String_Node_Str"+ op.getPackageName()+ "String_Node_Str"+ op.getBaseName()+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ entry.getValue()+ "String_Node_Str");
        html.append(Constants.HTML_TABLE_TD_END);
        html.append(Constants.HTML_TABLE_TR_END);
      }
    }
    if (!deprecatedTypes.isEmpty()) {
      html.append(getTableTagWithStyle("String_Node_Str"));
      html.append(getTableRowTagWithStyle("String_Node_Str"));
      html.append("String_Node_Str");
      html.append("String_Node_Str");
      html.append(Constants.HTML_TABLE_TH_END);
      html.append(Constants.HTML_TABLE_TR_END);
      for (      Map.Entry<IndexerType,String> entry : deprecatedTypes.entrySet()) {
        IndexerType op=entry.getKey();
        html.append(getTableRowTagWithStyle("String_Node_Str"));
        html.append(getTableDataTagWithStyle("String_Node_Str"));
        html.append("String_Node_Str" + op.getPackageName() + "String_Node_Str"+ op.getBaseName()+ Constants.DOT_HTML+ "String_Node_Str"+ op.getPackageName()+ "String_Node_Str"+ op.getBaseName()+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ entry.getValue()+ "String_Node_Str");
        html.append(Constants.HTML_TABLE_TD_END);
        html.append(Constants.HTML_TABLE_TR_END);
      }
    }
    if (!deprecatedElements.isEmpty()) {
      html.append(getTableTagWithStyle("String_Node_Str"));
      html.append(getTableRowTagWithStyle("String_Node_Str"));
      html.append("String_Node_Str");
      html.append("String_Node_Str");
      html.append(Constants.HTML_TABLE_TH_END);
      html.append(Constants.HTML_TABLE_TR_END);
      for (      Map.Entry<IndexerElementHolder,String> entry : deprecatedElements.entrySet()) {
        IndexerElementHolder elemHolder=entry.getKey();
        String baseHref=elemHolder.getPackageName();
        String typeDesc="String_Node_Str";
        String baseTitleDesc="String_Node_Str";
        String baseName="String_Node_Str";
        String inPageHref=elemHolder.getBaseName();
        if (elemHolder.isReqResp()) {
          baseHref=baseHref + SEPARATOR + elemHolder.getServiceName()+ Constants.DOT_HTML;
          if (elemHolder.isInput()) {
            typeDesc="String_Node_Str";
          }
 else {
            typeDesc="String_Node_Str";
          }
          baseName=elemHolder.getServiceName();
          baseTitleDesc=typeDesc + baseName;
          inPageHref=elemHolder.getOperationHolder().getBaseName();
        }
 else {
          baseHref=baseHref + TYPES + elemHolder.getElement().getContainerComplexType().getName()+ Constants.DOT_HTML;
          if (elemHolder.getElement() instanceof Element) {
            typeDesc="String_Node_Str";
          }
 else {
            typeDesc="String_Node_Str";
          }
          baseName=elemHolder.getElement().getContainerComplexType().getName();
          baseTitleDesc=typeDesc + baseName;
        }
        html.append(getTableRowTagWithStyle("String_Node_Str"));
        html.append(getTableDataTagWithStyle("String_Node_Str"));
        html.append("String_Node_Str" + baseHref + "String_Node_Str"+ inPageHref+ "String_Node_Str"+ elemHolder.getBaseName()+ "String_Node_Str"+ typeDesc+ "String_Node_Str"+ baseHref+ "String_Node_Str"+ baseTitleDesc+ "String_Node_Str"+ baseName+ "String_Node_Str");
        html.append("String_Node_Str" + "String_Node_Str" + entry.getValue() + "String_Node_Str");
        html.append(Constants.HTML_TABLE_TD_END);
        html.append(Constants.HTML_TABLE_TR_END);
      }
    }
    if (!deprecatedEnums.isEmpty()) {
      html.append(getTableTagWithStyle("String_Node_Str"));
      html.append(getTableRowTagWithStyle("String_Node_Str"));
      html.append("String_Node_Str");
      html.append("String_Node_Str");
      html.append(Constants.HTML_TABLE_TH_END);
      html.append(Constants.HTML_TABLE_TR_END);
      for (      Map.Entry<IndexerEnumValueElements,String> entry : deprecatedEnums.entrySet()) {
        html.append(getTableRowTagWithStyle("String_Node_Str"));
        html.append(getTableDataTagWithStyle("String_Node_Str"));
        IndexerEnumValueElements elemHolder=entry.getKey();
        String baseHref=elemHolder.getPackageName();
        String typeDesc="String_Node_Str";
        String baseTitleDesc="String_Node_Str";
        String baseName="String_Node_Str";
        String inPageHref=elemHolder.getBaseName();
        baseHref=baseHref + TYPES + elemHolder.getEnumElem().getType()+ Constants.DOT_HTML;
        typeDesc="String_Node_Str";
        baseName=elemHolder.getEnumElem().getType();
        baseTitleDesc=typeDesc + baseName;
        html.append("String_Node_Str" + baseHref + "String_Node_Str"+ inPageHref+ "String_Node_Str"+ elemHolder.getBaseName()+ "String_Node_Str"+ typeDesc+ "String_Node_Str"+ baseHref+ "String_Node_Str"+ baseTitleDesc+ "String_Node_Str"+ baseName+ "String_Node_Str");
        html.append("String_Node_Str" + "String_Node_Str" + entry.getValue() + "String_Node_Str");
        html.append(Constants.HTML_TABLE_TD_END);
        html.append(Constants.HTML_TABLE_TR_END);
      }
    }
  }
 else {
    html.append("String_Node_Str");
  }
  addFooter(html,false,false,null,"String_Node_Str",true,null);
  html.append(HtmlUtils.getEndTags());
  writeFile(html,getCurrentOutputDir(),"String_Node_Str");
}

Fixed version (ground truth):
private void createDeprecationFile(Map<String,IndexerDataObject> completeMap) throws OutputFormatterException {
  Map<IndexerType,String> deprecatedTypes=new TreeMap<IndexerType,String>();
  Map<IndexerElementHolder,String> deprecatedElements=new TreeMap<IndexerElementHolder,String>();
  Map<IndexerOperationHolder,String> deprecatedOperations=new TreeMap<IndexerOperationHolder,String>();
  Map<IndexerEnumValueElements,String> deprecatedEnums=new TreeMap<IndexerEnumValueElements,String>();
  for (  Map.Entry<String,IndexerDataObject> entry : completeMap.entrySet()) {
    List<IndexerBaseDataObject> data=entry.getValue().getDataObjects();
    Collections.sort(data);
    for (    IndexerBaseDataObject dataObj : data) {
      if (dataObj instanceof IndexerType) {
        StringBuffer depreDetails=AnnotationsHelper.processDeprication(((IndexerType)dataObj).getType().getAnnotations());
        if (depreDetails != null) {
          deprecatedTypes.put(((IndexerType)dataObj),depreDetails.toString());
        }
      }
      if (dataObj instanceof IndexerElementHolder) {
        StringBuffer depreDetails=AnnotationsHelper.processDeprication(((IndexerElementHolder)dataObj).getElement().getAnnotationInfo());
        if (depreDetails != null) {
          deprecatedElements.put(((IndexerElementHolder)dataObj),depreDetails.toString());
        }
      }
      if (dataObj instanceof IndexerOperationHolder) {
        StringBuffer depreDetails=AnnotationsHelper.processDeprication(((IndexerOperationHolder)dataObj).getOperation().getAnnotations());
        if (depreDetails == null) {
          OperationHolder oper=((IndexerOperationHolder)dataObj).getOperation();
          for (          Element input : oper.getInputTypes()) {
            depreDetails=AnnotationsHelper.processDeprication(input.getAnnotationInfo());
          }
          if (depreDetails == null) {
            for (            Element input : oper.getOutputTypes()) {
              depreDetails=AnnotationsHelper.processDeprication(input.getAnnotationInfo());
            }
          }
        }
        if (depreDetails != null) {
          deprecatedOperations.put(((IndexerOperationHolder)dataObj),depreDetails.toString());
        }
      }
      if (dataObj instanceof IndexerEnumValueElements) {
        StringBuffer depreDetails=AnnotationsHelper.processDeprication(((IndexerEnumValueElements)dataObj).getEnumElem().getAnnotations());
        if (depreDetails != null) {
          deprecatedEnums.put(((IndexerEnumValueElements)dataObj),depreDetails.toString());
        }
      }
    }
  }
  StringBuffer html=new StringBuffer();
  html.append(HtmlUtils.getStartTags("String_Node_Str",null));
  Map<String,String> replacementMap=new HashMap<String,String>();
  replacementMap.put("String_Node_Str","String_Node_Str");
  replacementMap.put("String_Node_Str","String_Node_Str");
  replacementMap.put("String_Node_Str","String_Node_Str");
  buildHeader(html,replacementMap,"String_Node_Str");
  html.append(getTextInDiv("String_Node_Str","String_Node_Str"));
  html.append(Constants.HTML_BR);
  if (!(deprecatedTypes.isEmpty() && deprecatedElements.isEmpty() && deprecatedEnums.isEmpty()&& deprecatedOperations.isEmpty())) {
    if (!deprecatedOperations.isEmpty()) {
      html.append(getTableTagWithStyle("String_Node_Str"));
      html.append(getTableRowTagWithStyle("String_Node_Str"));
      html.append("String_Node_Str");
      html.append("String_Node_Str");
      html.append(Constants.HTML_TABLE_TH_END);
      html.append(Constants.HTML_TABLE_TR_END);
      for (      Map.Entry<IndexerOperationHolder,String> entry : deprecatedOperations.entrySet()) {
        IndexerOperationHolder op=entry.getKey();
        html.append(getTableRowTagWithStyle("String_Node_Str"));
        html.append(getTableDataTagWithStyle("String_Node_Str"));
        html.append("String_Node_Str" + op.getPackageName() + op.getBaseName()+ Constants.DOT_HTML+ "String_Node_Str"+ op.getPackageName()+ "String_Node_Str"+ op.getBaseName()+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ entry.getValue()+ "String_Node_Str");
        html.append(Constants.HTML_TABLE_TD_END);
        html.append(Constants.HTML_TABLE_TR_END);
      }
    }
    if (!deprecatedTypes.isEmpty()) {
      html.append(getTableTagWithStyle("String_Node_Str"));
      html.append(getTableRowTagWithStyle("String_Node_Str"));
      html.append("String_Node_Str");
      html.append("String_Node_Str");
      html.append(Constants.HTML_TABLE_TH_END);
      html.append(Constants.HTML_TABLE_TR_END);
      for (      Map.Entry<IndexerType,String> entry : deprecatedTypes.entrySet()) {
        IndexerType op=entry.getKey();
        html.append(getTableRowTagWithStyle("String_Node_Str"));
        html.append(getTableDataTagWithStyle("String_Node_Str"));
        html.append("String_Node_Str" + op.getPackageName() + "String_Node_Str"+ op.getBaseName()+ Constants.DOT_HTML+ "String_Node_Str"+ op.getPackageName()+ "String_Node_Str"+ op.getBaseName()+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ entry.getValue()+ "String_Node_Str");
        html.append(Constants.HTML_TABLE_TD_END);
        html.append(Constants.HTML_TABLE_TR_END);
      }
    }
    if (!deprecatedElements.isEmpty()) {
      html.append(getTableTagWithStyle("String_Node_Str"));
      html.append(getTableRowTagWithStyle("String_Node_Str"));
      html.append("String_Node_Str");
      html.append("String_Node_Str");
      html.append(Constants.HTML_TABLE_TH_END);
      html.append(Constants.HTML_TABLE_TR_END);
      for (      Map.Entry<IndexerElementHolder,String> entry : deprecatedElements.entrySet()) {
        IndexerElementHolder elemHolder=entry.getKey();
        String baseHref=elemHolder.getPackageName();
        String typeDesc="String_Node_Str";
        String baseTitleDesc="String_Node_Str";
        String baseName="String_Node_Str";
        String inPageHref=elemHolder.getBaseName();
        if (elemHolder.isReqResp()) {
          baseHref=baseHref + SEPARATOR + elemHolder.getServiceName()+ Constants.DOT_HTML;
          if (elemHolder.isInput()) {
            typeDesc="String_Node_Str";
          }
 else {
            typeDesc="String_Node_Str";
          }
          baseName=elemHolder.getServiceName();
          baseTitleDesc=typeDesc + baseName;
          inPageHref=elemHolder.getOperationHolder().getBaseName();
        }
 else {
          baseHref=baseHref + TYPES + elemHolder.getElement().getContainerComplexType().getName()+ Constants.DOT_HTML;
          if (elemHolder.getElement() instanceof Element) {
            typeDesc="String_Node_Str";
          }
 else {
            typeDesc="String_Node_Str";
          }
          baseName=elemHolder.getElement().getContainerComplexType().getName();
          baseTitleDesc=typeDesc + baseName;
        }
        html.append(getTableRowTagWithStyle("String_Node_Str"));
        html.append(getTableDataTagWithStyle("String_Node_Str"));
        html.append("String_Node_Str" + baseHref + "String_Node_Str"+ inPageHref+ "String_Node_Str"+ elemHolder.getBaseName()+ "String_Node_Str"+ typeDesc+ "String_Node_Str"+ baseHref+ "String_Node_Str"+ baseTitleDesc+ "String_Node_Str"+ baseName+ "String_Node_Str");
        html.append("String_Node_Str" + "String_Node_Str" + entry.getValue() + "String_Node_Str");
        html.append(Constants.HTML_TABLE_TD_END);
        html.append(Constants.HTML_TABLE_TR_END);
      }
    }
    if (!deprecatedEnums.isEmpty()) {
      html.append(getTableTagWithStyle("String_Node_Str"));
      html.append(getTableRowTagWithStyle("String_Node_Str"));
      html.append("String_Node_Str");
      html.append("String_Node_Str");
      html.append(Constants.HTML_TABLE_TH_END);
      html.append(Constants.HTML_TABLE_TR_END);
      for (      Map.Entry<IndexerEnumValueElements,String> entry : deprecatedEnums.entrySet()) {
        html.append(getTableRowTagWithStyle("String_Node_Str"));
        html.append(getTableDataTagWithStyle("String_Node_Str"));
        IndexerEnumValueElements elemHolder=entry.getKey();
        String baseHref=elemHolder.getPackageName();
        String typeDesc="String_Node_Str";
        String baseTitleDesc="String_Node_Str";
        String baseName="String_Node_Str";
        String inPageHref=elemHolder.getBaseName();
        baseHref=baseHref + TYPES + elemHolder.getEnumElem().getType()+ Constants.DOT_HTML;
        typeDesc="String_Node_Str";
        baseName=elemHolder.getEnumElem().getType();
        baseTitleDesc=typeDesc + baseName;
        html.append("String_Node_Str" + baseHref + "String_Node_Str"+ inPageHref+ "String_Node_Str"+ elemHolder.getBaseName()+ "String_Node_Str"+ typeDesc+ "String_Node_Str"+ baseHref+ "String_Node_Str"+ baseTitleDesc+ "String_Node_Str"+ baseName+ "String_Node_Str");
        html.append("String_Node_Str" + "String_Node_Str" + entry.getValue() + "String_Node_Str");
        html.append(Constants.HTML_TABLE_TD_END);
        html.append(Constants.HTML_TABLE_TR_END);
      }
    }
  }
 else {
    html.append("String_Node_Str");
  }
  addFooter(html,replacementMap,"String_Node_Str");
  html.append(HtmlUtils.getEndTags());
  writeFile(html,getCurrentOutputDir(),"String_Node_Str");
}