Program: 64153
Project: 64153
Buggy source:
private URLConnection openConnection(URL aSource) throws IOException {
  URLConnection connection=aSource.openConnection();
  if (hasTimestamp) {
    connection.setIfModifiedSince(timestamp);
  }
  if (uname != null || pword != null) {
    String up=uname + "String_Node_Str" + pword;
    String encoding;
    Base64Converter encoder=new Base64Converter();
    encoding=encoder.encode(up.getBytes());
    connection.setRequestProperty("String_Node_Str","String_Node_Str" + encoding);
  }
  if (connection instanceof HttpURLConnection) {
    ((HttpURLConnection)connection).setInstanceFollowRedirects(false);
    ((HttpURLConnection)connection).setUseCaches(httpUseCaches);
  }
  try {
    connection.connect();
  }
 catch (  NullPointerException e) {
    throw new BuildException("String_Node_Str" + source.toString(),e);
  }
  if (connection instanceof HttpURLConnection) {
    HttpURLConnection httpConnection=(HttpURLConnection)connection;
    int responseCode=httpConnection.getResponseCode();
    if (responseCode == HttpURLConnection.HTTP_MOVED_PERM || responseCode == HttpURLConnection.HTTP_MOVED_TEMP || responseCode == HttpURLConnection.HTTP_SEE_OTHER) {
      String newLocation=httpConnection.getHeaderField("String_Node_Str");
      String message=aSource + (responseCode == HttpURLConnection.HTTP_MOVED_PERM ? "String_Node_Str" : "String_Node_Str") + "String_Node_Str"+ newLocation;
      log(message,logLevel);
      URL newURL=new URL(newLocation);
      if (!redirectionAllowed(aSource,newURL)) {
        return null;
      }
      return openConnection(newURL);
    }
    long lastModified=httpConnection.getLastModified();
    if (responseCode == HttpURLConnection.HTTP_NOT_MODIFIED || (lastModified != 0 && hasTimestamp && timestamp >= lastModified)) {
      log("String_Node_Str",logLevel);
      return null;
    }
    if (responseCode == HttpURLConnection.HTTP_UNAUTHORIZED) {
      String message="String_Node_Str";
      if (ignoreErrors) {
        log(message,logLevel);
        return null;
      }
 else {
        throw new BuildException(message);
      }
    }
  }
  return connection;
}

Fixed version (ground truth):
private URLConnection openConnection(URL aSource) throws IOException {
  URLConnection connection=aSource.openConnection();
  if (hasTimestamp) {
    connection.setIfModifiedSince(timestamp);
  }
  if (uname != null || pword != null) {
    String up=uname + "String_Node_Str" + pword;
    String encoding;
    Base64Converter encoder=new Base64Converter();
    encoding=encoder.encode(up.getBytes());
    connection.setRequestProperty("String_Node_Str","String_Node_Str" + encoding);
  }
  if (connection instanceof HttpURLConnection) {
    ((HttpURLConnection)connection).setInstanceFollowRedirects(false);
    ((HttpURLConnection)connection).setUseCaches(httpUseCaches);
  }
  try {
    connection.connect();
  }
 catch (  NullPointerException e) {
    throw new BuildException("String_Node_Str" + source.toString(),e);
  }
  if (connection instanceof HttpURLConnection) {
    HttpURLConnection httpConnection=(HttpURLConnection)connection;
    int responseCode=httpConnection.getResponseCode();
    if (responseCode == HttpURLConnection.HTTP_MOVED_PERM || responseCode == HttpURLConnection.HTTP_MOVED_TEMP || responseCode == HttpURLConnection.HTTP_SEE_OTHER) {
      String newLocation=httpConnection.getHeaderField("String_Node_Str");
      String message=aSource + (responseCode == HttpURLConnection.HTTP_MOVED_PERM ? "String_Node_Str" : "String_Node_Str") + "String_Node_Str"+ newLocation;
      log(message,logLevel);
      URL newURL=new URL(aSource,newLocation);
      if (!redirectionAllowed(aSource,newURL)) {
        return null;
      }
      return openConnection(newURL);
    }
    long lastModified=httpConnection.getLastModified();
    if (responseCode == HttpURLConnection.HTTP_NOT_MODIFIED || (lastModified != 0 && hasTimestamp && timestamp >= lastModified)) {
      log("String_Node_Str",logLevel);
      return null;
    }
    if (responseCode == HttpURLConnection.HTTP_UNAUTHORIZED) {
      String message="String_Node_Str";
      if (ignoreErrors) {
        log(message,logLevel);
        return null;
      }
 else {
        throw new BuildException(message);
      }
    }
  }
  return connection;
}