public String provideUsername(Item item) {
        return isUsingCredentialsPlugin() ? PluginsUtils.credentialsLookup(credentialsId, item).getUsername() :  credentials.getUsername();
    }
public String provideUsername ( Item item ) { return isUsingCredentialsPlugin ( ) ? PluginsUtils . credentialsLookup ( credentialsId , item ) . getUsername ( ) : credentials . getUsername ( ) ; }
Not like getUsername this will return the username of the current Credentials mode of the system (legacy/credentials plugin)

@return the username that should be apply in this configuration