Program: 100719
Project: 100719
Buggy source:
/** 
 * Parse the input attributes for needed information.
 * @param atts all attributes
 * @param attrName attributes to process
 */
private void parseAttribute(final Attributes atts,final String attrName) throws SAXException {
  String attrValue=atts.getValue(attrName);
  final String attrClass=atts.getValue(ATTRIBUTE_NAME_CLASS);
  final String attrScope=atts.getValue(ATTRIBUTE_NAME_SCOPE);
  String attrFormat=atts.getValue(ATTRIBUTE_NAME_FORMAT);
  final String attrType=atts.getValue(ATTRIBUTE_NAME_TYPE);
  final String codebase=atts.getValue(ATTRIBUTE_NAME_CODEBASE);
  if (attrValue == null) {
    return;
  }
  if (ATTRIBUTE_NAME_CONREF.equals(attrName) || ATTRIBUTE_NAME_CONKEYREF.equals(attrName)) {
    hasConRef=true;
  }
 else   if (ATTRIBUTE_NAME_HREF.equals(attrName)) {
    if (attrClass != null && PR_D_CODEREF.matches(attrClass)) {
      hasCodeRef=true;
    }
 else {
      hasHref=true;
    }
  }
 else   if (ATTRIBUTE_NAME_KEYREF.equals(attrName)) {
    hasKeyRef=true;
  }
  if (ATTR_SCOPE_VALUE_EXTERNAL.equals(attrScope) || ATTR_SCOPE_VALUE_PEER.equals(attrScope) || attrValue.contains(COLON_DOUBLE_SLASH)|| attrValue.startsWith(SHARP)) {
    return;
  }
  final URI target=toURI(attrValue);
  String filename=null;
  if (isAbsolute(target) && !ATTRIBUTE_NAME_DATA.equals(attrName)) {
    filename=getRelativeUnixPath(rootFilePath.getAbsoluteFile().toURI().getPath(),target.getPath());
  }
 else   if (ATTRIBUTE_NAME_DATA.equals(attrName)) {
    if (!isEmptyString(codebase)) {
      filename=resolve(codebase,attrValue).getPath();
    }
 else {
      filename=resolve(currentDir,attrValue).getPath();
    }
  }
 else {
    filename=resolve(currentDir,attrValue).getPath();
  }
  filename=toFile(filename).getPath();
  if (MAP_TOPICREF.matches(attrClass)) {
    if (ATTR_TYPE_VALUE_SUBJECT_SCHEME.equalsIgnoreCase(attrType)) {
      schemeSet.add(new File(filename));
    }
  }
 else   if (TOPIC_IMAGE.matches(attrClass)) {
    if (attrFormat == null) {
      attrFormat="String_Node_Str";
    }
  }
  if (("String_Node_Str".equals(attrType) && ATTRIBUTE_NAME_DATA.equals(attrName)) || attrClass != null && PR_D_CODEREF.matches(attrClass)) {
    subsidiarySet.add(new File(filename));
    return;
  }
  if ((ATTRIBUTE_NAME_HREF.equals(attrName) || ATTRIBUTE_NAME_DATA.equals(attrName)) && (atts.getValue(ATTRIBUTE_NAME_COPY_TO) == null || (atts.getValue(ATTRIBUTE_NAME_CHUNK) != null && atts.getValue(ATTRIBUTE_NAME_CHUNK).contains("String_Node_Str"))) && (canResolved() || isSupportedImageFile(filename.toLowerCase()))) {
    nonConrefCopytoTargets.add(new Reference(filename,attrFormat));
  }
  if (attrFormat != null && !ATTR_FORMAT_VALUE_DITA.equals(attrFormat)) {
    return;
  }
  if (ATTRIBUTE_NAME_HREF.equals(attrName) && isFormatDita(attrFormat) && canResolved()) {
    hrefTargets.add(new File(filename));
    toOutFile(new File(filename));
    if (chunkLevel > 0 && chunkToNavLevel == 0 && topicGroupLevel == 0 && relTableLevel == 0) {
      chunkTopicSet.add(new File(filename));
    }
 else {
      hrefTopicSet.add(new File(filename));
    }
  }
  if (ATTRIBUTE_NAME_CONREF.equals(attrName)) {
    conrefTargets.add(new File(filename));
    toOutFile(new File(filename));
  }
  if (ATTRIBUTE_NAME_COPY_TO.equals(attrName) && isFormatDita(attrFormat)) {
    final URI href=toURI(atts.getValue(ATTRIBUTE_NAME_HREF));
    if (href != null) {
      final File value=resolve(currentDir,toFile(href).getPath());
      if (href.toString().isEmpty()) {
        logger.warn("String_Node_Str" + filename + "String_Node_Str");
      }
 else       if (copytoMap.get(new File(filename)) != null) {
        if (!value.equals(copytoMap.get(new File(filename)))) {
          logger.warn(MessageUtils.getInstance().getMessage("String_Node_Str",href.toString(),filename).toString());
        }
        ignoredCopytoSourceSet.add(toFile(href));
      }
 else       if (!(atts.getValue(ATTRIBUTE_NAME_CHUNK) != null && atts.getValue(ATTRIBUTE_NAME_CHUNK).contains("String_Node_Str"))) {
        copytoMap.put(new File(filename),value);
      }
    }
    final File pathWithoutID=resolve(currentDir,toFile(attrValue).getPath());
    if (chunkLevel > 0 && chunkToNavLevel == 0 && topicGroupLevel == 0) {
      chunkTopicSet.add(pathWithoutID);
    }
 else {
      hrefTopicSet.add(pathWithoutID);
    }
  }
  if (ATTRIBUTE_NAME_CONACTION.equals(attrName)) {
    if (attrValue.equals("String_Node_Str") || attrValue.equals("String_Node_Str")) {
      hasconaction=true;
    }
  }
}

Fixed version (ground truth):
/** 
 * Parse the input attributes for needed information.
 * @param atts all attributes
 * @param attrName attributes to process
 */
private void parseAttribute(final Attributes atts,final String attrName) throws SAXException {
  String attrValue=atts.getValue(attrName);
  final String attrClass=atts.getValue(ATTRIBUTE_NAME_CLASS);
  final String attrScope=atts.getValue(ATTRIBUTE_NAME_SCOPE);
  String attrFormat=atts.getValue(ATTRIBUTE_NAME_FORMAT);
  final String attrType=atts.getValue(ATTRIBUTE_NAME_TYPE);
  final String codebase=atts.getValue(ATTRIBUTE_NAME_CODEBASE);
  if (attrValue == null) {
    return;
  }
  if (ATTRIBUTE_NAME_CONREF.equals(attrName) || ATTRIBUTE_NAME_CONKEYREF.equals(attrName)) {
    hasConRef=true;
  }
 else   if (ATTRIBUTE_NAME_HREF.equals(attrName)) {
    if (PR_D_CODEREF.matches(attrClass)) {
      hasCodeRef=true;
    }
 else {
      hasHref=true;
    }
  }
 else   if (ATTRIBUTE_NAME_KEYREF.equals(attrName)) {
    hasKeyRef=true;
  }
  if (ATTR_SCOPE_VALUE_EXTERNAL.equals(attrScope) || ATTR_SCOPE_VALUE_PEER.equals(attrScope) || attrValue.contains(COLON_DOUBLE_SLASH)|| attrValue.startsWith(SHARP)) {
    return;
  }
  final URI target=toURI(attrValue);
  String filename=null;
  if (isAbsolute(target) && !ATTRIBUTE_NAME_DATA.equals(attrName)) {
    filename=getRelativeUnixPath(rootFilePath.getAbsoluteFile().toURI().getPath(),target.getPath());
  }
 else   if (ATTRIBUTE_NAME_DATA.equals(attrName)) {
    if (!isEmptyString(codebase)) {
      filename=resolve(codebase,attrValue).getPath();
    }
 else {
      filename=resolve(currentDir,attrValue).getPath();
    }
  }
 else {
    filename=resolve(currentDir,attrValue).getPath();
  }
  filename=toFile(filename).getPath();
  if (MAP_TOPICREF.matches(attrClass)) {
    if (ATTR_TYPE_VALUE_SUBJECT_SCHEME.equalsIgnoreCase(attrType)) {
      schemeSet.add(new File(filename));
    }
  }
 else   if (TOPIC_IMAGE.matches(attrClass)) {
    if (attrFormat == null) {
      attrFormat="String_Node_Str";
    }
  }
  if (("String_Node_Str".equals(attrType) && ATTRIBUTE_NAME_DATA.equals(attrName)) || PR_D_CODEREF.matches(attrClass)) {
    subsidiarySet.add(new File(filename));
    return;
  }
  if ((ATTRIBUTE_NAME_HREF.equals(attrName) || ATTRIBUTE_NAME_DATA.equals(attrName)) && (atts.getValue(ATTRIBUTE_NAME_COPY_TO) == null || (atts.getValue(ATTRIBUTE_NAME_CHUNK) != null && atts.getValue(ATTRIBUTE_NAME_CHUNK).contains("String_Node_Str"))) && (canResolved() || isSupportedImageFile(filename.toLowerCase()))) {
    nonConrefCopytoTargets.add(new Reference(filename,attrFormat));
  }
  if (attrFormat != null && !ATTR_FORMAT_VALUE_DITA.equals(attrFormat)) {
    return;
  }
  if (ATTRIBUTE_NAME_HREF.equals(attrName) && isFormatDita(attrFormat) && canResolved()) {
    hrefTargets.add(new File(filename));
    toOutFile(new File(filename));
    if (chunkLevel > 0 && chunkToNavLevel == 0 && topicGroupLevel == 0 && relTableLevel == 0) {
      chunkTopicSet.add(new File(filename));
    }
 else {
      hrefTopicSet.add(new File(filename));
    }
  }
  if (ATTRIBUTE_NAME_CONREF.equals(attrName)) {
    conrefTargets.add(new File(filename));
    toOutFile(new File(filename));
  }
  if (ATTRIBUTE_NAME_COPY_TO.equals(attrName) && isFormatDita(attrFormat)) {
    final URI href=toURI(atts.getValue(ATTRIBUTE_NAME_HREF));
    if (href != null) {
      final File value=resolve(currentDir,toFile(href).getPath());
      if (href.toString().isEmpty()) {
        logger.warn("String_Node_Str" + filename + "String_Node_Str");
      }
 else       if (copytoMap.get(new File(filename)) != null) {
        if (!value.equals(copytoMap.get(new File(filename)))) {
          logger.warn(MessageUtils.getInstance().getMessage("String_Node_Str",href.toString(),filename).toString());
        }
        ignoredCopytoSourceSet.add(toFile(href));
      }
 else       if (!(atts.getValue(ATTRIBUTE_NAME_CHUNK) != null && atts.getValue(ATTRIBUTE_NAME_CHUNK).contains("String_Node_Str"))) {
        copytoMap.put(new File(filename),value);
      }
    }
    final File pathWithoutID=resolve(currentDir,toFile(attrValue).getPath());
    if (chunkLevel > 0 && chunkToNavLevel == 0 && topicGroupLevel == 0) {
      chunkTopicSet.add(pathWithoutID);
    }
 else {
      hrefTopicSet.add(pathWithoutID);
    }
  }
  if (ATTRIBUTE_NAME_CONACTION.equals(attrName)) {
    if (attrValue.equals("String_Node_Str") || attrValue.equals("String_Node_Str")) {
      hasconaction=true;
    }
  }
}