Program: 54865
Project: 54865
Buggy source:
public void intercept(HttpRequest request) throws IOException {
  HttpHeaders headers=request.headers;
  StringBuilder messageBuf=new StringBuilder();
  messageBuf.append(request.method).append('\n');
  String contentMD5=headers.contentMD5;
  if (contentMD5 != null) {
    messageBuf.append(contentMD5);
  }
  messageBuf.append('\n');
  HttpContent content=request.content;
  if (content != null) {
    String contentType=content.getType();
    messageBuf.append(contentType);
  }
  messageBuf.append('\n');
  Object date=headers.date;
  if (date != null) {
    messageBuf.append(headers.date);
  }
  messageBuf.append('\n');
  TreeMap<String,String> extensions=new TreeMap<String,String>();
  for (  Map.Entry<String,Object> headerEntry : headers.entrySet()) {
    String name=headerEntry.getKey().toLowerCase();
    Object value=headerEntry.getValue();
    if (value != null && name.startsWith("String_Node_Str")) {
      if (value instanceof Collection<?>) {
        @SuppressWarnings("String_Node_Str") Collection<Object> collectionValue=(Collection<Object>)value;
        StringBuilder buf=new StringBuilder();
        boolean first=true;
        for (        Object repeatedValue : collectionValue) {
          if (first) {
            first=false;
          }
 else {
            buf.append(',');
          }
          buf.append(WHITESPACE_PATTERN.matcher(repeatedValue.toString()).replaceAll("String_Node_Str"));
        }
        extensions.put(name,buf.toString());
      }
 else {
        extensions.put(name,WHITESPACE_PATTERN.matcher(value.toString()).replaceAll("String_Node_Str"));
      }
    }
  }
  for (  Map.Entry<String,String> extensionEntry : extensions.entrySet()) {
    messageBuf.append(extensionEntry.getKey()).append(':').append(extensionEntry.getValue()).append('\n');
  }
  GenericUrl url=request.url;
  String host=url.host;
  if (!host.endsWith(HOST)) {
    throw new IllegalArgumentException("String_Node_Str" + HOST);
  }
  int bucketNameLength=host.length() - HOST.length() - 1;
  if (bucketNameLength > 0) {
    String bucket=host.substring(0,bucketNameLength);
    if (!bucket.equals("String_Node_Str")) {
      messageBuf.append('/').append(bucket);
    }
  }
  if (url.get("String_Node_Str") != null) {
    messageBuf.append("String_Node_Str");
  }
 else   if (url.get("String_Node_Str") != null) {
    messageBuf.append("String_Node_Str");
  }
 else   if (url.get("String_Node_Str") != null) {
    messageBuf.append("String_Node_Str");
  }
 else   if (url.get("String_Node_Str") != null) {
    messageBuf.append("String_Node_Str");
  }
 else   if (url.get("String_Node_Str") != null) {
    messageBuf.append("String_Node_Str");
  }
  messageBuf.append(url.getRawPath());
  try {
    request.headers.authorization="String_Node_Str" + accessKey + "String_Node_Str"+ HmacSha.sign(secret,messageBuf.toString());
  }
 catch (  GeneralSecurityException e) {
    IOException io=new IOException();
    io.initCause(e);
    throw io;
  }
}

Fixed version (ground truth):
public void intercept(HttpRequest request) throws IOException {
  HttpHeaders headers=request.headers;
  StringBuilder messageBuf=new StringBuilder();
  messageBuf.append(request.method).append('\n');
  String contentMD5=headers.contentMD5;
  if (contentMD5 != null) {
    messageBuf.append(contentMD5);
  }
  messageBuf.append('\n');
  HttpContent content=request.content;
  if (content != null) {
    String contentType=content.getType();
    messageBuf.append(contentType);
  }
  messageBuf.append('\n');
  Object date=headers.date;
  if (date != null) {
    messageBuf.append(headers.date);
  }
  messageBuf.append('\n');
  TreeMap<String,String> extensions=new TreeMap<String,String>();
  for (  Map.Entry<String,Object> headerEntry : headers.entrySet()) {
    String name=headerEntry.getKey().toLowerCase();
    Object value=headerEntry.getValue();
    if (value != null && name.startsWith("String_Node_Str")) {
      if (value instanceof Collection<?>) {
        @SuppressWarnings("String_Node_Str") Collection<Object> collectionValue=(Collection<Object>)value;
        StringBuilder buf=new StringBuilder();
        boolean first=true;
        for (        Object repeatedValue : collectionValue) {
          if (first) {
            first=false;
          }
 else {
            buf.append(',');
          }
          buf.append(WHITESPACE_PATTERN.matcher(repeatedValue.toString()).replaceAll("String_Node_Str"));
        }
        extensions.put(name,buf.toString());
      }
 else {
        extensions.put(name,WHITESPACE_PATTERN.matcher(value.toString()).replaceAll("String_Node_Str"));
      }
    }
  }
  for (  Map.Entry<String,String> extensionEntry : extensions.entrySet()) {
    messageBuf.append(extensionEntry.getKey()).append(':').append(extensionEntry.getValue()).append('\n');
  }
  GenericUrl url=request.url;
  String host=url.host;
  if (!host.endsWith(HOST)) {
    throw new IllegalArgumentException("String_Node_Str" + HOST);
  }
  int bucketNameLength=host.length() - HOST.length() - 1;
  if (bucketNameLength > 0) {
    String bucket=host.substring(0,bucketNameLength);
    if (!bucket.equals("String_Node_Str")) {
      messageBuf.append('/').append(bucket);
    }
  }
  if (url.pathParts != null) {
    messageBuf.append(url.getRawPath());
  }
  if (url.get("String_Node_Str") != null) {
    messageBuf.append("String_Node_Str");
  }
 else   if (url.get("String_Node_Str") != null) {
    messageBuf.append("String_Node_Str");
  }
 else   if (url.get("String_Node_Str") != null) {
    messageBuf.append("String_Node_Str");
  }
 else   if (url.get("String_Node_Str") != null) {
    messageBuf.append("String_Node_Str");
  }
 else   if (url.get("String_Node_Str") != null) {
    messageBuf.append("String_Node_Str");
  }
  try {
    request.headers.authorization="String_Node_Str" + accessKey + "String_Node_Str"+ HmacSha.sign(secret,messageBuf.toString());
  }
 catch (  GeneralSecurityException e) {
    IOException io=new IOException();
    io.initCause(e);
    throw io;
  }
}