Program: 54425
Project: 54425
Buggy source:
public static MongoClientConfiguration getMongoClientConfiguration(Replication replication){
  HostAndPort syncSource=HostAndPort.fromString(replication.getSyncSource()).withDefaultPort(27017);
  MongoClientConfiguration.Builder mongoClientConfigurationBuilder=new MongoClientConfiguration.Builder(syncSource);
  SSL ssl=replication.getSsl();
  mongoClientConfigurationBuilder.setSslEnabled(ssl.getEnabled());
  if (ssl.getEnabled()) {
    try {
      mongoClientConfigurationBuilder.setSslAllowInvalidHostnames(ssl.getAllowInvalidHostnames());
      TrustManager[] tms=getTrustManagers(ssl);
      KeyManager[] kms=getKeyManagers(ssl);
      SSLContext sslContext;
      if (ssl.getFipsMode()) {
        sslContext=SSLContext.getInstance("String_Node_Str","String_Node_Str");
      }
 else {
        sslContext=SSLContext.getInstance("String_Node_Str");
      }
      sslContext.init(kms,tms,null);
      mongoClientConfigurationBuilder.setSocketFactory(sslContext.getSocketFactory());
    }
 catch (    CertificateException|KeyManagementException|KeyStoreException|UnrecoverableKeyException|NoSuchProviderException|NoSuchAlgorithmException|IOException exception) {
      throw new SystemException(exception);
    }
  }
  Auth auth=replication.getAuth();
  if (auth.getMode().isEnabled()) {
    MongoAuthenticationConfiguration mongoAuthenticationConfiguration=getMongoAuthenticationConfiguration(auth,ssl);
    mongoClientConfigurationBuilder.addAuthenticationConfiguration(mongoAuthenticationConfiguration);
  }
  return mongoClientConfigurationBuilder.build();
}

Fixed version (ground truth):
public static MongoClientConfiguration getMongoClientConfiguration(AbstractReplication replication){
  HostAndPort syncSource=HostAndPort.fromString(replication.getSyncSource()).withDefaultPort(27017);
  MongoClientConfiguration.Builder mongoClientConfigurationBuilder=new MongoClientConfiguration.Builder(syncSource);
  SSL ssl=replication.getSsl();
  mongoClientConfigurationBuilder.setSslEnabled(ssl.getEnabled());
  if (ssl.getEnabled()) {
    try {
      mongoClientConfigurationBuilder.setSslAllowInvalidHostnames(ssl.getAllowInvalidHostnames());
      TrustManager[] tms=getTrustManagers(ssl);
      KeyManager[] kms=getKeyManagers(ssl);
      SSLContext sslContext;
      if (ssl.getFipsMode()) {
        sslContext=SSLContext.getInstance("String_Node_Str","String_Node_Str");
      }
 else {
        sslContext=SSLContext.getInstance("String_Node_Str");
      }
      sslContext.init(kms,tms,null);
      mongoClientConfigurationBuilder.setSocketFactory(sslContext.getSocketFactory());
    }
 catch (    CertificateException|KeyManagementException|KeyStoreException|UnrecoverableKeyException|NoSuchProviderException|NoSuchAlgorithmException|IOException exception) {
      throw new SystemException(exception);
    }
  }
  Auth auth=replication.getAuth();
  if (auth.getMode().isEnabled()) {
    MongoAuthenticationConfiguration mongoAuthenticationConfiguration=getMongoAuthenticationConfiguration(auth,ssl);
    mongoClientConfigurationBuilder.addAuthenticationConfiguration(mongoAuthenticationConfiguration);
  }
  return mongoClientConfigurationBuilder.build();
}