Buggy code:
public class SamlSecurityRealm extends SecurityRealm { private static final Logger LOG = Logger . getLogger ( SamlSecurityRealm . class . getName ( ) ) ; private static final String REFERER_ATTRIBUTE = ( SamlSecurityRealm . class . getName ( ) ) + ".referer" ; private static final String CONSUMER_SERVICE_URL_PATH = "securityRealm//finishLogin" ; private static final String DEFAULT_DISPLAY_NAME_ATTRIBUTE_NAME = "http:////schemas.xmlsoap.org//ws//2005//05//identity//claims//name" ; private static final String DEFAULT_GROUPS_ATTRIBUTE_NAME = "http:////schemas.xmlsoap.org//claims//Group" ; private static final int DEFAULT_MAXIMUM_AUTHENTICATION_LIFETIME = ( 24 * 60 ) * 60 ; private String idpMetadata ; private String displayNameAttributeName ; private String groupsAttributeName ; private int maximumAuthenticationLifetime ; private String usernameAttributeName ; private SamlEncryptionData encryptionData = null ; @ DataBoundConstructor public SamlSecurityRealm ( String signOnUrl , String idpMetadata , String displayNameAttributeName , String groupsAttributeName , Integer maximumAuthenticationLifetime , String usernameAttributeName , SamlEncryptionData encryptionData ) { } @ Override public boolean allowsSignup ( ) { } @ Override public SecurityComponents createSecurityComponents ( ) { } @ Override public String getLoginUrl ( ) { } public HttpResponse doCommenceLogin ( StaplerRequest request , @ Header ( "Referer" ) final String referer ) { } public HttpResponse doFinishLogin ( StaplerRequest request , StaplerResponse response ) { } private String getUsernameFromProfile ( Saml2Profile saml2Profile ) { if ( ( usernameAttributeName ) != null ) { Object attribute = saml2Profile . getAttribute ( usernameAttributeName ) ; if ( attribute instanceof String ) { return ( ( String ) ( attribute ) ) ; } if ( attribute instanceof List ) { return ( ( String ) ( ( ( List < ? > ) ( attribute ) ) . get ( 0 ) ) ) ; } SamlSecurityRealm . LOG . log ( Level . SEVERE , "Unable<seq2seq4repair_space>to<seq2seq4repair_space>get<seq2seq4repair_space>username<seq2seq4repair_space>from<seq2seq4repair_space>Saml<seq2seq4repair_space>Profile<seq2seq4repair_space>{0}" , saml2Profile ) ; <START_BUG> throw new Error ( ( ( "Attribute<seq2seq4repair_space>" + ( usernameAttributeName ) ) + "<seq2seq4repair_space>contains<seq2seq4repair_space>no<seq2seq4repair_space>usable<seq2seq4repair_space>username" ) ) ; <END_BUG> } else { return saml2Profile . getId ( ) ; } } public HttpResponse doMetadata ( StaplerRequest request , StaplerResponse response ) { } private Saml2Client newClient ( ) { } private String baseUrl ( ) { } private String getConsumerServiceUrl ( ) { } public String getIdpMetadata ( ) { } public void setIdpMetadata ( String idpMetadata ) { } public String getUsernameAttributeName ( ) { } public void setUsernameAttributeName ( String attribute ) { } public String getSpMetadata ( ) { } public String getDisplayNameAttributeName ( ) { } public String getGroupsAttributeName ( ) { } public Integer getMaximumAuthenticationLifetime ( ) { } public SamlEncryptionData getEncryptionData ( ) { } public String getKeystorePath ( ) { } public String getKeystorePassword ( ) { } public String getPrivateKeyPassword ( ) { } @ Extension public static final class DescriptorImpl extends Descriptor < SecurityRealm > { public DescriptorImpl ( ) { } public DescriptorImpl ( Class < ? extends SecurityRealm > clazz ) { } @ Override public String getDisplayName ( ) { } } }

Fix:
throw new IllegalStateException ( ( ( "Attribute<seq2seq4repair_space>" + ( usernameAttributeName ) ) + "<seq2seq4repair_space>contains<seq2seq4repair_space>no<seq2seq4repair_space>usable<seq2seq4repair_space>username" ) ) ;