Program: 116508
Project: 116508
Buggy source:
public boolean login(String serverURL,String username,String password,boolean validateLogin) throws Exception {
  try {
    SSLContext sc;
    sc=SSLContext.getInstance("String_Node_Str");
    HostnameVerifier hv=new HostnameVerifier(){
      public boolean verify(      String urlHostName,      SSLSession session){
        return true;
      }
    }
;
    TrustManager[] trustAllCerts=new TrustManager[]{new X509TrustManager(){
      public java.security.cert.X509Certificate[] getAcceptedIssuers(){
        return null;
      }
      public void checkClientTrusted(      java.security.cert.X509Certificate[] certs,      String authType){
      }
      public void checkServerTrusted(      java.security.cert.X509Certificate[] certs,      String authType){
      }
    }
};
    sc.init(null,trustAllCerts,new java.security.SecureRandom());
    SSLContext.setDefault(sc);
    HttpsURLConnection.setDefaultHostnameVerifier(hv);
  }
 catch (  Exception e) {
    throw new RuntimeException("String_Node_Str",e);
  }
  try {
    initializeRestClient(serverURL,username,password);
    if (logger.isDebugEnabled()) {
      logger.debug("String_Node_Str",username);
    }
  }
 catch (  AxisFault e) {
    System.out.println("String_Node_Str");
    throw new CommandException(e);
  }
  DefaultHttpClient httpClient=new DefaultHttpClient();
  try {
    if (validateLogin) {
      HttpResponse response=restClient.doGet(httpClient,restClient.getBaseURL() + initializeCookieEndpoint);
      if (response != null) {
        String responseCode="String_Node_Str" + response.getStatusLine().getStatusCode();
        if ((responseCode.equals(CliConstants.RESPONSE_OK)) && (response.toString().contains("String_Node_Str"))) {
          return true;
        }
 else {
          System.out.println("String_Node_Str");
          return false;
        }
      }
      return true;
    }
 else {
      return true;
    }
  }
 catch (  ClientProtocolException e) {
    System.out.println("String_Node_Str");
    return false;
  }
catch (  ConnectException e) {
    System.out.println("String_Node_Str");
    return false;
  }
 finally {
    httpClient.getConnectionManager().shutdown();
  }
}

Fixed version (ground truth):
public boolean login(String serverURL,String username,String password,boolean validateLogin) throws Exception {
  try {
    SSLContext sc;
    sc=SSLContext.getInstance("String_Node_Str");
    HostnameVerifier hv=new HostnameVerifier(){
      public boolean verify(      String urlHostName,      SSLSession session){
        return true;
      }
    }
;
    TrustManager[] trustAllCerts=new TrustManager[]{new X509TrustManager(){
      public java.security.cert.X509Certificate[] getAcceptedIssuers(){
        return null;
      }
      public void checkClientTrusted(      java.security.cert.X509Certificate[] certs,      String authType){
      }
      public void checkServerTrusted(      java.security.cert.X509Certificate[] certs,      String authType){
      }
    }
};
    sc.init(null,trustAllCerts,new java.security.SecureRandom());
    SSLContext.setDefault(sc);
    HttpsURLConnection.setDefaultHostnameVerifier(hv);
  }
 catch (  Exception e) {
    throw new RuntimeException("String_Node_Str",e);
  }
  try {
    initializeRestClient(serverURL,username,password);
    if (logger.isDebugEnabled()) {
      logger.debug("String_Node_Str",username);
    }
  }
 catch (  AxisFault e) {
    System.out.println("String_Node_Str");
    throw new CommandException(e);
  }
  DefaultHttpClient httpClient=new DefaultHttpClient();
  try {
    if (validateLogin) {
      HttpResponse response=restClient.doGet(httpClient,restClient.getBaseURL() + initializeCookieEndpoint);
      if (response != null) {
        String responseCode="String_Node_Str" + response.getStatusLine().getStatusCode();
        if ((responseCode.equals(CliConstants.RESPONSE_OK)) && (response.toString().contains("String_Node_Str"))) {
          return true;
        }
 else {
          System.out.println("String_Node_Str");
        }
      }
      return false;
    }
 else {
      return true;
    }
  }
 catch (  ClientProtocolException e) {
    System.out.println("String_Node_Str");
    return false;
  }
catch (  ConnectException e) {
    System.out.println("String_Node_Str");
    return false;
  }
 finally {
    httpClient.getConnectionManager().shutdown();
  }
}