Buggy code:
} if ( sourceWorkspace == null ) { throw new RevokeProposalNotCreatedException ( "Workspace<seq2seq4repair_space>not<seq2seq4repair_space>found." ) ; } if ( ! ( sourceWorkspace . isShared ( ) ) ) { throw new RevokeProposalNotCreatedException ( "This<seq2seq4repair_space>workspace<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>shared." ) ; } List < User > addressees = new ArrayList < User > ( ) ; for ( RevokeMessage revokeMessage : revokeMessages ) { User addressee ; try { addressee = userDao . getByEmail ( revokeMessage . getUser_id ( ) ) ; revokeMessage . setUser_id ( addressee . getId ( ) . toString ( ) ) ; if ( ! ( addressee . getId ( ) . equals ( user . getId ( ) ) ) ) { addressees . add ( addressee ) ; } } catch ( IllegalArgumentException e ) { Handler . logger . error ( e ) ; throw new RevokeProposalNotCreatedException ( e ) ; } catch ( DAOException e ) { Handler . logger . warn ( String . format ( "Email<seq2seq4repair_space>'%s'<seq2seq4repair_space>does<seq2seq4repair_space>not<seq2seq4repair_space>correspond<seq2seq4repair_space>with<seq2seq4repair_space>any<seq2seq4repair_space>user.<seq2seq4repair_space>" , revokeMessage . getUser_id ( ) ) , e ) ; } } if ( addressees . isEmpty ( ) ) { throw new RevokeProposalNotCreatedException ( "No<seq2seq4repair_space>addressees<seq2seq4repair_space>found" ) ; } Gson gson = new Gson ( ) ; SystemKey publicKey = gson . fromJson ( new String ( ( ( ABEWorkspace ) ( sourceWorkspace ) ) . getPublicKey ( ) ) , SystemKey . class ) ; ArrayList < AttributeUpdate > attributeVersions = new ArrayList < AttributeUpdate > ( ) ; for ( RevokeMessage revokeMessage : revokeMessages ) { try { workspaceDAO . deleteUserAttributes ( sourceWorkspace . getId ( ) , UUID . fromString ( revokeMessage . getUser_id ( ) ) , revokeMessage . getMinimal_set ( ) ) ; } catch ( NoRowsAffectedDAOException e ) { } for ( RevokeComponent component : revokeMessage . getPkComponents ( ) . values ( ) ) { publicKey . getAttribute_map ( ) . put ( component . getName ( ) , component . getPk_ti ( ) ) ; attributeVersions . add ( new AttributeUpdate ( component . getName ( ) , ( ( component . getVersion ( ) ) - 1 ) , component . getRe_key ( ) ) ) ; } } ( ( ABEWorkspace ) ( sourceWorkspace ) ) . setPublicKey ( gson . toJson ( publicKey ) . getBytes ( ) ) ; workspaceDAO . addAttributeVersions ( workspaceId , attributeVersions ) ; workspaceDAO . updateWorkspacePublicKey ( workspaceId , ( ( ABEWorkspace ) ( sourceWorkspace ) ) . getPublicKey ( ) ) ; List < UserWorkspace > workspaceMembers ; try { workspaceMembers = doGetWorkspaceMembers ( user , sourceWorkspace ) ; } catch ( InternalServerError e1 ) { throw new RevokeProposalNotCreatedException ( e1 . toString ( ) ) ; } HashMap < String , LinkedList < AttributeUpdate > > getAttributeVersions = workspaceDAO . getAttributeVersions ( workspaceId ) ; Map < String , Integer > attributeUniverse = workspaceDAO . getAttributeUniverse ( workspaceId ) ; Map < UUID , RevokeNotification > usersNotifications = new HashMap < UUID , RevokeNotification > ( ) ; KPABE kpabe = new KPABE ( Config . getCurvePath ( ) ) ; for ( UserWorkspace workspaceMember : workspaceMembers ) { if ( ! ( workspaceMember . getUser ( ) . getId ( ) . equals ( user . getId ( ) ) ) ) { HashMap < String , AttributeUpdateForUser > userAttributes = workspaceDAO . getUserAttributes ( workspaceId , workspaceMember . getUser ( ) . getId ( ) ) ; for ( RevokeMessage revokeMessage : revokeMessages ) { for ( RevokeComponent component : revokeMessage . getPkComponents ( ) . values ( ) ) { if ( ( userAttributes . get ( component . getName ( ) ) ) != null ) { <START_BUG> byte [ ] updatedSk = kpabe . updateSK ( userAttributes . get ( component . getName ( ) ) . getVersion ( ) , userAttributes . get ( component . getName ( ) ) . getSk_ti ( ) , getAttributeVersions . get ( component . getName ( ) ) ) ; <END_BUG> userAttributes . put ( component . getName ( ) , new AttributeUpdateForUser ( component . getName ( ) , ( ( getAttributeVersions . get ( component . getName ( ) ) . size ( ) ) + 1 ) , updatedSk ) ) ; } } } workspaceDAO . updateUserAttributes ( workspaceId , workspaceMember . getUser ( ) . getId ( ) , userAttributes . values ( ) ) ; byte [ ] secretKeyBytes = workspaceDAO . getWorkspaceUserSecretKey ( workspaceId , workspaceMember . getUser ( ) . getId ( ) ) ; KPABESecretKey secretKey = gson . fromJson ( new String ( secretKeyBytes ) , KPABESecretKey . class ) ; for ( AttributeUpdateForUser updateForUser : userAttributes . values ( ) ) { secretKey . getLeaf_keys ( ) . put ( attributeUniverse . get ( updateForUser . getAttribute ( ) ) , updateForUser . getSk_ti ( ) ) ; } secretKeyBytes = gson . toJson ( secretKey ) . getBytes ( ) ; usersNotifications . put ( workspaceMember . getUser ( ) . getId ( ) , new RevokeNotification ( workspaceId , ( ( ABEWorkspace ) ( sourceWorkspace ) ) . getPublicKey ( ) , secretKeyBytes ) ) ; workspaceDAO . updateWorkspaceUserSecretKey ( workspaceId , workspaceMember . getUser ( ) . getId ( ) , secretKeyBytes ) ; } } return usersNotifications ; } public void doUnshareFolder ( User user , List < String > emails , Item item , boolean isEncrypted ) throws ShareProposalNotCreatedException , UserNotFoundException { } public List < UserWorkspace > doGetWorkspaceMembers ( User user , Workspace workspace ) throws InternalServerError { } public Connection getConnection ( ) { } private void commitObject ( SyncMetadata item , Workspace workspace , Device device ) throws CommitExistantVersion , CommitWrongVersion , CommitWrongVersionNoParent , DAOException { } private void saveNewObject ( SyncMetadata metadata , Workspace workspace , Device device ) throws DAOException { } private Item getItemFromMeta ( SyncMetadata meta , Item parent , Workspace workspace ) throws ClassCastException { }

Fix:
byte [ ] updatedSk = kpabe . updateSK ( ( ( userAttributes . get ( component . getName ( ) ) . getVersion ( ) ) - 1 ) , userAttributes . get ( component . getName ( ) ) . getSk_ti ( ) , getAttributeVersions . get ( component . getName ( ) ) ) ;