Program: 114759
Project: 114759
Buggy source:
/** 
 * Apply SSL related settings to httpClient according to the current values of verifyingSsl and sslCaCert.
 */
private void applySslSettings(){
  try {
    KeyManager[] keyManagers=null;
    TrustManager[] trustManagers=null;
    HostnameVerifier hostnameVerifier=null;
    if (!verifyingSsl) {
      TrustManager trustAll=new X509TrustManager(){
        @Override public void checkClientTrusted(        X509Certificate[] chain,        String authType) throws CertificateException {
        }
        @Override public void checkServerTrusted(        X509Certificate[] chain,        String authType) throws CertificateException {
        }
        @Override public X509Certificate[] getAcceptedIssuers(){
          return null;
        }
      }
;
      SSLContext sslContext=SSLContext.getInstance("String_Node_Str");
      trustManagers=new TrustManager[]{trustAll};
      hostnameVerifier=new HostnameVerifier(){
        @Override public boolean verify(        String hostname,        SSLSession session){
          return true;
        }
      }
;
    }
 else     if (sslCaCert != null) {
      char[] password=null;
      CertificateFactory certificateFactory=CertificateFactory.getInstance("String_Node_Str");
      Collection<? extends Certificate> certificates=certificateFactory.generateCertificates(sslCaCert);
      if (certificates.isEmpty()) {
        throw new IllegalArgumentException("String_Node_Str");
      }
      KeyStore caKeyStore=newEmptyKeyStore(password);
      int index=0;
      for (      Certificate certificate : certificates) {
        String certificateAlias="String_Node_Str" + Integer.toString(index++);
        caKeyStore.setCertificateEntry(certificateAlias,certificate);
      }
      TrustManagerFactory trustManagerFactory=TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm());
      trustManagerFactory.init(caKeyStore);
      trustManagers=trustManagerFactory.getTrustManagers();
    }
    if (keyManagers != null || trustManagers != null) {
      SSLContext sslContext=SSLContext.getInstance("String_Node_Str");
      sslContext.init(keyManagers,trustManagers,new SecureRandom());
      httpClient.setSslSocketFactory(sslContext.getSocketFactory());
    }
 else {
      httpClient.setSslSocketFactory(null);
    }
    httpClient.setHostnameVerifier(hostnameVerifier);
  }
 catch (  GeneralSecurityException e) {
    throw new RuntimeException(e);
  }
}

Fixed version (ground truth):
/** 
 * Apply SSL related settings to httpClient according to the current values of verifyingSsl and sslCaCert.
 */
private void applySslSettings(){
  try {
    TrustManager[] trustManagers=null;
    HostnameVerifier hostnameVerifier=null;
    if (!verifyingSsl) {
      trustManagers=new TrustManager[]{trustAll};
      hostnameVerifier=(hostname,session) -> true;
    }
 else     if (sslCaCert != null) {
      char[] password=null;
      CertificateFactory certificateFactory=CertificateFactory.getInstance("String_Node_Str");
      Collection<? extends Certificate> certificates=certificateFactory.generateCertificates(sslCaCert);
      if (certificates.isEmpty()) {
        throw new IllegalArgumentException("String_Node_Str");
      }
      KeyStore caKeyStore=newEmptyKeyStore(password);
      int index=0;
      for (      Certificate certificate : certificates) {
        String certificateAlias="String_Node_Str" + Integer.toString(index++);
        caKeyStore.setCertificateEntry(certificateAlias,certificate);
      }
      TrustManagerFactory trustManagerFactory=TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm());
      trustManagerFactory.init(caKeyStore);
      trustManagers=trustManagerFactory.getTrustManagers();
    }
    if (trustManagers != null) {
      SSLContext sslContext=SSLContext.getInstance("String_Node_Str");
      sslContext.init(null,trustManagers,new SecureRandom());
      httpClient.setSslSocketFactory(sslContext.getSocketFactory());
    }
 else {
      httpClient.setSslSocketFactory(null);
    }
    httpClient.setHostnameVerifier(hostnameVerifier);
  }
 catch (  GeneralSecurityException e) {
    throw new RuntimeException(e);
  }
}