Program: 100835
Project: 100835
Buggy source:
@Override public void startElement(final String uri,final String localName,final String qName,final Attributes atts) throws SAXException {
  final String attrValue=atts.getValue(ATTRIBUTE_NAME_PROCESSING_ROLE);
  if (attrValue != null) {
    processStack.push(attrValue);
    processLevel++;
    if (ATTR_PROCESSING_ROLE_VALUE_RESOURCE_ONLY.equalsIgnoreCase(attrValue)) {
      return;
    }
  }
 else   if (processLevel > 0) {
    processLevel++;
    if (ATTR_PROCESSING_ROLE_VALUE_RESOURCE_ONLY.equalsIgnoreCase(processStack.peek())) {
      return;
    }
  }
  mapInfo.append(LESS_THAN).append(qName);
  final String classValue=atts.getValue(ATTRIBUTE_NAME_CLASS);
  final int attsLen=atts.getLength();
  for (int i=0; i < attsLen; i++) {
    final String attQName=atts.getQName(i);
    String attValue=atts.getValue(i);
    if (ATTRIBUTE_NAME_HREF.equals(attQName) && !StringUtils.isEmptyString(attValue) && classValue != null && MAP_TOPICREF.matches(classValue)) {
      final String scopeValue=atts.getValue(ATTRIBUTE_NAME_SCOPE);
      final String formatValue=atts.getValue(ATTRIBUTE_NAME_FORMAT);
      if ((scopeValue == null || ATTR_SCOPE_VALUE_LOCAL.equalsIgnoreCase(scopeValue)) && (formatValue == null || ATTR_FORMAT_VALUE_DITA.equalsIgnoreCase(formatValue))) {
        final String ohref=attValue;
        final String copyToValue=atts.getValue(ATTRIBUTE_NAME_COPY_TO);
        if (!StringUtils.isEmptyString(copyToValue)) {
          attValue=copyToValue;
        }
        if (util.isVisited(attValue)) {
          mapInfo.append(STRING_BLANK).append("String_Node_Str").append(EQUAL).append(QUOTATION).append(StringUtils.escapeXML(ohref)).append(QUOTATION);
          attValue=new StringBuffer(SHARP).append(util.getIdValue(attValue)).toString();
        }
 else {
          mapInfo.append(STRING_BLANK).append("String_Node_Str").append(EQUAL).append(QUOTATION).append(StringUtils.escapeXML(ohref)).append(QUOTATION);
          util.visit(attValue);
          if (new File(dirPath,attValue).exists()) {
            final String fileId=topicParser.parse(attValue,dirPath);
            attValue=new StringBuffer(SHARP).append(fileId).toString();
          }
 else {
            final String fileName=new File(dirPath,attValue).getAbsolutePath();
            final Properties prop=new Properties();
            prop.put("String_Node_Str",fileName);
            logger.logError(MessageUtils.getMessage("String_Node_Str",prop).toString());
          }
        }
      }
    }
    mapInfo.append(STRING_BLANK).append(attQName).append(EQUAL).append(QUOTATION).append(StringUtils.escapeXML(attValue)).append(QUOTATION);
  }
  mapInfo.append(GREATER_THAN);
}

Fixed version (ground truth):
@Override public void startElement(final String uri,final String localName,final String qName,final Attributes atts) throws SAXException {
  final String attrValue=atts.getValue(ATTRIBUTE_NAME_PROCESSING_ROLE);
  if (attrValue != null) {
    processStack.push(attrValue);
    processLevel++;
    if (ATTR_PROCESSING_ROLE_VALUE_RESOURCE_ONLY.equalsIgnoreCase(attrValue)) {
      return;
    }
  }
 else   if (processLevel > 0) {
    processLevel++;
    if (ATTR_PROCESSING_ROLE_VALUE_RESOURCE_ONLY.equalsIgnoreCase(processStack.peek())) {
      return;
    }
  }
  mapInfo.append(LESS_THAN).append(qName);
  final String classValue=atts.getValue(ATTRIBUTE_NAME_CLASS);
  final int attsLen=atts.getLength();
  for (int i=0; i < attsLen; i++) {
    final String attQName=atts.getQName(i);
    String attValue=atts.getValue(i);
    if (ATTRIBUTE_NAME_HREF.equals(attQName) && !StringUtils.isEmptyString(attValue) && classValue != null && MAP_TOPICREF.matches(classValue)) {
      final String scopeValue=atts.getValue(ATTRIBUTE_NAME_SCOPE);
      final String formatValue=atts.getValue(ATTRIBUTE_NAME_FORMAT);
      if ((scopeValue == null || ATTR_SCOPE_VALUE_LOCAL.equalsIgnoreCase(scopeValue)) && (formatValue == null || ATTR_FORMAT_VALUE_DITA.equalsIgnoreCase(formatValue))) {
        final String ohref=attValue;
        final String copyToValue=atts.getValue(ATTRIBUTE_NAME_COPY_TO);
        if (!StringUtils.isEmptyString(copyToValue)) {
          attValue=copyToValue;
        }
        if (util.isVisited(attValue)) {
          mapInfo.append(STRING_BLANK).append("String_Node_Str").append(EQUAL).append(QUOTATION).append(StringUtils.escapeXML(ohref)).append(QUOTATION);
          attValue=new StringBuffer(SHARP).append(util.getIdValue(attValue)).toString();
        }
 else {
          mapInfo.append(STRING_BLANK).append("String_Node_Str").append(EQUAL).append(QUOTATION).append(StringUtils.escapeXML(ohref)).append(QUOTATION);
          util.visit(attValue);
          if (new File(dirPath,attValue.indexOf(SHARP) != -1 ? attValue.substring(0,attValue.indexOf(SHARP)) : attValue).exists()) {
            final String fileId=topicParser.parse(attValue,dirPath);
            attValue=new StringBuffer(SHARP).append(fileId).toString();
          }
 else {
            final String fileName=new File(dirPath,attValue).getAbsolutePath();
            final Properties prop=new Properties();
            prop.put("String_Node_Str",fileName);
            logger.logError(MessageUtils.getMessage("String_Node_Str",prop).toString());
          }
        }
      }
    }
    mapInfo.append(STRING_BLANK).append(attQName).append(EQUAL).append(QUOTATION).append(StringUtils.escapeXML(attValue)).append(QUOTATION);
  }
  mapInfo.append(GREATER_THAN);
}