Program: 89537
Project: 89537
Buggy source:
private void writeHttpRecords(WARCWriter w,final CrawlURI curi,final URI baseid,final String timestamp) throws IOException {
  ANVLRecord headers=new ANVLRecord(5);
  if (curi.getContentDigest() != null) {
    headers.addLabelValue(HEADER_KEY_PAYLOAD_DIGEST,curi.getContentDigestSchemeString());
  }
  headers.addLabelValue(HEADER_KEY_IP,getHostAddress(curi));
  URI rid;
  if (IdenticalDigestDecideRule.hasIdenticalDigest(curi) && ((Boolean)getUncheckedAttribute(curi,ATTR_WRITE_REVISIT_FOR_IDENTICAL_DIGESTS))) {
    rid=writeRevisitDigest(w,timestamp,HTTP_RESPONSE_MIMETYPE,baseid,curi,headers);
  }
 else   if (curi.getFetchStatus() == HttpStatus.SC_NOT_MODIFIED && ((Boolean)getUncheckedAttribute(curi,ATTR_WRITE_REVISIT_FOR_NOT_MODIFIED))) {
    rid=writeRevisitNotModified(w,timestamp,baseid,curi,headers);
  }
 else {
    if (curi.isTruncatedFetch()) {
      String value=curi.isTimeTruncatedFetch() ? NAMED_FIELD_TRUNCATED_VALUE_TIME : curi.isLengthTruncatedFetch() ? NAMED_FIELD_TRUNCATED_VALUE_LENGTH : curi.isHeaderTruncatedFetch() ? NAMED_FIELD_TRUNCATED_VALUE_HEAD : TRUNCATED_VALUE_UNSPECIFIED;
      headers.addLabelValue(HEADER_KEY_TRUNCATED,value);
    }
    rid=writeResponse(w,timestamp,HTTP_RESPONSE_MIMETYPE,baseid,curi,headers);
  }
  headers=new ANVLRecord(1);
  headers.addLabelValue(HEADER_KEY_CONCURRENT_TO,'<' + rid.toString() + '>');
  if (((Boolean)getUncheckedAttribute(curi,ATTR_WRITE_REQUESTS))) {
    writeRequest(w,timestamp,HTTP_REQUEST_MIMETYPE,baseid,curi,headers);
  }
  if (((Boolean)getUncheckedAttribute(curi,ATTR_WRITE_METADATA))) {
    writeMetadata(w,timestamp,baseid,curi,headers);
  }
}

Fixed version (ground truth):
private void writeHttpRecords(WARCWriter w,final CrawlURI curi,final URI baseid,final String timestamp) throws IOException {
  ANVLRecord headers=new ANVLRecord(5);
  if (curi.getContentDigest() != null) {
    headers.addLabelValue(HEADER_KEY_PAYLOAD_DIGEST,curi.getContentDigestSchemeString());
  }
  headers.addLabelValue(HEADER_KEY_IP,getHostAddress(curi));
  URI rid;
  if (IdenticalDigestDecideRule.hasIdenticalDigest(curi) && ((Boolean)getUncheckedAttribute(curi,ATTR_WRITE_REVISIT_FOR_IDENTICAL_DIGESTS))) {
    rid=writeRevisitDigest(w,timestamp,HTTP_RESPONSE_MIMETYPE,baseid,curi,headers);
  }
 else   if (curi.getFetchStatus() == HttpStatus.SC_NOT_MODIFIED && ((Boolean)getUncheckedAttribute(curi,ATTR_WRITE_REVISIT_FOR_NOT_MODIFIED))) {
    rid=writeRevisitNotModified(w,timestamp,baseid,curi,headers);
  }
 else {
    if (curi.isTruncatedFetch()) {
      String value=curi.isTimeTruncatedFetch() ? NAMED_FIELD_TRUNCATED_VALUE_TIME : curi.isLengthTruncatedFetch() ? NAMED_FIELD_TRUNCATED_VALUE_LENGTH : curi.isHeaderTruncatedFetch() ? NAMED_FIELD_TRUNCATED_VALUE_HEAD : TRUNCATED_VALUE_UNSPECIFIED;
      headers.addLabelValue(HEADER_KEY_TRUNCATED,value);
    }
    rid=writeResponse(w,timestamp,HTTP_RESPONSE_MIMETYPE,baseid,curi,headers);
  }
  headers=new ANVLRecord(1);
  headers.addLabelValue(HEADER_KEY_CONCURRENT_TO,'<' + rid.toString() + '>');
  if (((Boolean)getUncheckedAttribute(curi,ATTR_WRITE_REQUESTS))) {
    writeRequest(w,timestamp,HTTP_REQUEST_MIMETYPE,baseid,curi,headers);
  }
  if (((Boolean)getUncheckedAttribute(curi,ATTR_WRITE_METADATA))) {
    writeMetadata(w,timestamp,baseid,curi,headers,((Boolean)getUncheckedAttribute(curi,ATTR_WRITE_METADATA_OUTLINKS)));
  }
}