Program: 166222
Project: 166222
Buggy source:
private void updateDBSSLURL(){
  if (conf != null && conf.get(PROPERTY_PREFIX + DB_SSL_ENABLED) != null) {
    String db_ssl_enabled=conf.get(PROPERTY_PREFIX + DB_SSL_ENABLED);
    if (StringUtils.isEmpty(db_ssl_enabled) || !"String_Node_Str".equalsIgnoreCase(db_ssl_enabled)) {
      db_ssl_enabled="String_Node_Str";
    }
    db_ssl_enabled=db_ssl_enabled.toLowerCase();
    if ("String_Node_Str".equalsIgnoreCase(db_ssl_enabled)) {
      String db_ssl_required=conf.get(PROPERTY_PREFIX + DB_SSL_REQUIRED);
      if (StringUtils.isEmpty(db_ssl_required) || !"String_Node_Str".equalsIgnoreCase(db_ssl_required)) {
        db_ssl_required="String_Node_Str";
      }
      db_ssl_required=db_ssl_required.toLowerCase();
      String db_ssl_verifyServerCertificate=conf.get(PROPERTY_PREFIX + DB_SSL_VerifyServerCertificate);
      if (StringUtils.isEmpty(db_ssl_verifyServerCertificate) || !"String_Node_Str".equalsIgnoreCase(db_ssl_verifyServerCertificate)) {
        db_ssl_verifyServerCertificate="String_Node_Str";
      }
      db_ssl_verifyServerCertificate=db_ssl_verifyServerCertificate.toLowerCase();
      conf.set(PROPERTY_PREFIX + DB_SSL_ENABLED,db_ssl_enabled);
      conf.set(PROPERTY_PREFIX + DB_SSL_REQUIRED,db_ssl_required);
      conf.set(PROPERTY_PREFIX + DB_SSL_VerifyServerCertificate,db_ssl_verifyServerCertificate);
      String ranger_jpa_jdbc_url=conf.get(PROPERTY_PREFIX + DB_URL);
      if (!StringUtils.isEmpty(ranger_jpa_jdbc_url)) {
        StringBuffer ranger_jpa_jdbc_url_ssl=new StringBuffer(ranger_jpa_jdbc_url);
        ranger_jpa_jdbc_url_ssl.append("String_Node_Str" + db_ssl_enabled + "String_Node_Str"+ db_ssl_required+ "String_Node_Str"+ db_ssl_verifyServerCertificate);
        conf.set(PROPERTY_PREFIX + DB_URL,ranger_jpa_jdbc_url_ssl.toString());
        DB_PROPERTIES.put(JPA_DB_URL,conf.get(PROPERTY_PREFIX + DB_URL));
        logger.info(PROPERTY_PREFIX + DB_URL + "String_Node_Str"+ ranger_jpa_jdbc_url_ssl.toString());
      }
      if ("String_Node_Str".equalsIgnoreCase(db_ssl_verifyServerCertificate)) {
        if (conf != null) {
          String keystore=conf.get(PROPERTY_PREFIX + DB_SSL_KEYSTORE);
          if (!StringUtils.isEmpty(keystore)) {
            Path path=Paths.get(keystore);
            if (Files.exists(path) && Files.isReadable(path)) {
              System.setProperty("String_Node_Str",conf.get(PROPERTY_PREFIX + DB_SSL_KEYSTORE));
              System.setProperty("String_Node_Str",conf.get(PROPERTY_PREFIX + DB_SSL_KEYSTORE_PASSWORD));
              System.setProperty("String_Node_Str",KeyStore.getDefaultType());
            }
 else {
              logger.debug("String_Node_Str" + keystore + "String_Node_Str");
            }
          }
 else {
            logger.debug("String_Node_Str" + PROPERTY_PREFIX + DB_SSL_KEYSTORE+ "String_Node_Str");
          }
          String truststore=conf.get(PROPERTY_PREFIX + DB_SSL_TRUSTSTORE);
          if (!StringUtils.isEmpty(truststore)) {
            Path path=Paths.get(truststore);
            if (Files.exists(path) && Files.isReadable(path)) {
              System.setProperty("String_Node_Str",conf.get(PROPERTY_PREFIX + DB_SSL_TRUSTSTORE));
              System.setProperty("String_Node_Str",conf.get(PROPERTY_PREFIX + DB_SSL_TRUSTSTORE_PASSWORD));
              System.setProperty("String_Node_Str",KeyStore.getDefaultType());
            }
 else {
              logger.debug("String_Node_Str" + truststore + "String_Node_Str");
            }
          }
 else {
            logger.debug("String_Node_Str" + PROPERTY_PREFIX + DB_SSL_TRUSTSTORE+ "String_Node_Str");
          }
        }
      }
    }
  }
}

Fixed version (ground truth):
private void updateDBSSLURL(){
  if (conf != null && conf.get(PROPERTY_PREFIX + DB_SSL_ENABLED) != null) {
    final String db_ssl_enabled=normalize(conf.get(PROPERTY_PREFIX + DB_SSL_ENABLED));
    if ("String_Node_Str".equalsIgnoreCase(db_ssl_enabled)) {
      final String db_ssl_required=normalize(conf.get(PROPERTY_PREFIX + DB_SSL_REQUIRED));
      final String db_ssl_verifyServerCertificate=normalize(conf.get(PROPERTY_PREFIX + DB_SSL_VerifyServerCertificate));
      conf.set(PROPERTY_PREFIX + DB_SSL_ENABLED,db_ssl_enabled);
      conf.set(PROPERTY_PREFIX + DB_SSL_REQUIRED,db_ssl_required);
      conf.set(PROPERTY_PREFIX + DB_SSL_VerifyServerCertificate,db_ssl_verifyServerCertificate);
      String ranger_jpa_jdbc_url=conf.get(PROPERTY_PREFIX + DB_URL);
      if (!StringUtils.isEmpty(ranger_jpa_jdbc_url)) {
        String ranger_jpa_jdbc_url_ssl=ranger_jpa_jdbc_url + "String_Node_Str" + db_ssl_enabled+ "String_Node_Str"+ db_ssl_required+ "String_Node_Str"+ db_ssl_verifyServerCertificate;
        conf.set(PROPERTY_PREFIX + DB_URL,ranger_jpa_jdbc_url_ssl);
        jpaProperties.put(JPA_DB_URL,conf.get(PROPERTY_PREFIX + DB_URL));
        logger.info(PROPERTY_PREFIX + DB_URL + "String_Node_Str"+ ranger_jpa_jdbc_url_ssl);
      }
      if ("String_Node_Str".equalsIgnoreCase(db_ssl_verifyServerCertificate)) {
        String keystore=conf.get(PROPERTY_PREFIX + DB_SSL_KEYSTORE);
        if (!StringUtils.isEmpty(keystore)) {
          Path path=Paths.get(keystore);
          if (Files.exists(path) && Files.isReadable(path)) {
            System.setProperty("String_Node_Str",conf.get(PROPERTY_PREFIX + DB_SSL_KEYSTORE));
            System.setProperty("String_Node_Str",conf.get(PROPERTY_PREFIX + DB_SSL_KEYSTORE_PASSWORD));
            System.setProperty("String_Node_Str",KeyStore.getDefaultType());
          }
 else {
            logger.debug("String_Node_Str" + keystore + "String_Node_Str");
          }
        }
 else {
          logger.debug("String_Node_Str" + PROPERTY_PREFIX + DB_SSL_KEYSTORE+ "String_Node_Str");
        }
        String truststore=conf.get(PROPERTY_PREFIX + DB_SSL_TRUSTSTORE);
        if (!StringUtils.isEmpty(truststore)) {
          Path path=Paths.get(truststore);
          if (Files.exists(path) && Files.isReadable(path)) {
            System.setProperty("String_Node_Str",conf.get(PROPERTY_PREFIX + DB_SSL_TRUSTSTORE));
            System.setProperty("String_Node_Str",conf.get(PROPERTY_PREFIX + DB_SSL_TRUSTSTORE_PASSWORD));
            System.setProperty("String_Node_Str",KeyStore.getDefaultType());
          }
 else {
            logger.debug("String_Node_Str" + truststore + "String_Node_Str");
          }
        }
 else {
          logger.debug("String_Node_Str" + PROPERTY_PREFIX + DB_SSL_TRUSTSTORE+ "String_Node_Str");
        }
      }
    }
  }
}