Buggy code:
@ AutoConfig public class Oauth2Action extends BaseAction { private static final long serialVersionUID = 8175470892708878896L ; @ Autowired private transient OAuthManager oauthManager ; @ Autowired ( required = false ) private HttpErrorHandler httpErrorHandler ; @ Autowired private transient UserDetailsService userDetailsService ; @ Autowired private transient DefaultUsernamePasswordAuthenticationFilter usernamePasswordAuthenticationFilter ; private String username ; private String password ; private String client_id ; private String client_secret ; private String redirect_uri ; private String scope ; private String code ; private String response_type ; private String grant_type ; private String state ; private String access_token ; private String refresh_token ; private String token ; private String approval_prompt ; private Authorization authorization ; private Client client ; private Map < String , Object > tojson ; private boolean displayForNative ; private boolean granted ; private boolean denied ; public String getUsername ( ) { } public void setUsername ( String username ) { } public String getPassword ( ) { } public void setPassword ( String password ) { } public Map < String , Object > getTojson ( ) { } public Client getClient ( ) { } public Authorization getAuthorization ( ) { } public String getState ( ) { } public void setState ( String state ) { } public String getAccess_token ( ) { } public void setAccess_token ( String access_token ) { } public String getRefresh_token ( ) { } public void setRefresh_token ( String refresh_token ) { } public String getToken ( ) { } public void setToken ( String token ) { } public String getCode ( ) { } public void setCode ( String code ) { } public String getClient_id ( ) { } public void setClient_id ( String client_id ) { } public String getClient_secret ( ) { } public void setClient_secret ( String client_secret ) { } public String getGrant_type ( ) { } public void setGrant_type ( String grant_type ) { } public String getRedirect_uri ( ) { } public void setRedirect_uri ( String redirect_uri ) { } public String getScope ( ) { } public void setScope ( String scope ) { } public String getResponse_type ( ) { } public void setResponse_type ( String response_type ) { } public String getApproval_prompt ( ) { } public void setApproval_prompt ( String approval_prompt ) { } public boolean isDisplayForNative ( ) { } public boolean isGranted ( ) { } public boolean isDenied ( ) { } @ Override public String execute ( ) { } public String auth ( ) { try { client = oauthManager . findClientById ( client_id ) ; if ( ( client ) == null ) throw new IllegalArgumentException ( "CLIENT_ID_INVALID" ) ; UserDetails grantor = AuthzUtils . getUserDetails ( ) ; if ( ( ! ( "force" . equals ( approval_prompt ) ) ) && ( grantor != null ) ) { List < Authorization > auths = oauthManager . findAuthorizationsByGrantor ( grantor ) ; for ( Authorization auth : auths ) { <START_BUG> if ( ( ( Objects . equal ( auth . getClient ( ) , client ) ) && ( Objects . equal ( auth . getResponseType ( ) , response_type ) ) ) && ( Objects . equal ( auth . getScope ( ) , scope ) ) ) { <END_BUG> authorization = auth ; break ; } } if ( ( authorization ) != null ) { authorization = oauthManager . reuse ( authorization ) ; return grant ( ) ; } } authorization = oauthManager . generate ( client , redirect_uri , scope , response_type ) ; client = oauthManager . findClientById ( authorization . getClient ( ) ) ; displayForNative = client . isNative ( ) ; setUid ( authorization . getId ( ) ) ; } catch ( Exception e ) { if ( ( ( httpErrorHandler ) != null ) && ( httpErrorHandler . handle ( ServletActionContext . getRequest ( ) , ServletActionContext . getResponse ( ) , SC_BAD_REQUEST , e . getMessage ( ) ) ) ) return NONE ; try { ServletActionContext . getResponse ( ) . sendError ( SC_BAD_REQUEST , e . getMessage ( ) ) ; } catch ( IOException e1 ) { e1 . printStackTrace ( ) ; } return NONE ; } return INPUT ; } public String grant ( ) { } public String deny ( ) { } @ JsonConfig ( root = "tojson" ) public String token ( ) { } @ JsonConfig ( root = "tojson" ) public String info ( ) { } public String revoke ( ) { } }

Fix:
if ( ( ( Objects . equal ( auth . getClient ( ) , client . getId ( ) ) ) && ( Objects . equal ( auth . getResponseType ( ) , response_type ) ) ) && ( Objects . equal ( auth . getScope ( ) , scope ) ) ) {