Buggy code:
public class SimpleACLAuthorizer implements IAuthorizer { private static final Logger LOG = LoggerFactory . getLogger ( SimpleACLAuthorizer . class ) ; protected Set < String > _userCommands = new HashSet < String > ( Arrays . asList ( "submitTopology" , "fileUpload" , "getNimbusConf" , "getClusterInfo" ) ) ; protected Set < String > _supervisorCommands = new HashSet < String > ( Arrays . asList ( "fileDownload" ) ) ; protected Set < String > _topoCommands = new HashSet < String > ( Arrays . asList ( "killTopology" , "rebalance" , "activate" , "deactivate" , "getTopologyConf" , "getTopology" , "getUserTopology" , "getTopologyInfo" , "uploadNewCredentials" ) ) ; protected Set < String > _admins ; protected Set < String > _supervisors ; protected IPrincipalToLocal _ptol ; protected IGroupMappingServiceProvider _groupMappingProvider ; @ Override public void prepare ( Map conf ) { } @ Override public boolean permit ( ReqContext context , String operation , Map topology_conf ) { SimpleACLAuthorizer . LOG . info ( ( ( ( ( ( ( ( ( "[req<seq2seq4repair_space>" + ( context . requestID ( ) ) ) + "]<seq2seq4repair_space>Access<seq2seq4repair_space>" ) + "<seq2seq4repair_space>from:<seq2seq4repair_space>" ) + ( ( context . remoteAddress ( ) ) == null ? "null" : context . remoteAddress ( ) . toString ( ) ) ) + ( ( context . principal ( ) ) == null ? "" : "<seq2seq4repair_space>principal:" + ( context . principal ( ) ) ) ) + "<seq2seq4repair_space>op:" ) + operation ) + ( topology_conf == null ? "" : "<seq2seq4repair_space>topoology:" + ( topology_conf . get ( TOPOLOGY_NAME ) ) ) ) ) ; String principal = context . principal ( ) . getName ( ) ; String user = _ptol . toLocal ( context . principal ( ) ) ; if ( ( _admins . contains ( principal ) ) || ( _admins . contains ( user ) ) ) { return true ; } if ( ( _supervisors . contains ( principal ) ) || ( _supervisors . contains ( user ) ) ) { return _supervisorCommands . contains ( operation ) ; } if ( _userCommands . contains ( operation ) ) { return true ; } if ( _topoCommands . contains ( operation ) ) { Set topoUsers = new HashSet < String > ( ) ; if ( topology_conf . containsKey ( TOPOLOGY_USERS ) ) { topoUsers . addAll ( ( ( Collection < String > ) ( topology_conf . get ( TOPOLOGY_USERS ) ) ) ) ; } if ( ( topoUsers . contains ( principal ) ) || ( topoUsers . contains ( user ) ) ) { return true ; } Set < String > topoGroups = new HashSet < String > ( ) ; <START_BUG> if ( ( topology_conf . containsKey ( TOPOLOGY_GROUPS ) ) && ( ( topology_conf . get ( TOPOLOGY_GROUPS ) ) != null ) ) { <END_BUG> topoGroups . addAll ( ( ( Collection < String > ) ( topology_conf . get ( TOPOLOGY_GROUPS ) ) ) ) ; } if ( ( ( _groupMappingProvider ) != null ) && ( ( topoGroups . size ( ) ) > 0 ) ) { try { Set < String > userGroups = _groupMappingProvider . getGroups ( user ) ; for ( String tgroup : topoGroups ) { if ( userGroups . contains ( tgroup ) ) return true ; } } catch ( IOException e ) { SimpleACLAuthorizer . LOG . warn ( "Error<seq2seq4repair_space>while<seq2seq4repair_space>trying<seq2seq4repair_space>to<seq2seq4repair_space>fetch<seq2seq4repair_space>user<seq2seq4repair_space>groups" , e ) ; } } } return false ; } }

Fix:
if ( topology_conf . containsKey ( TOPOLOGY_GROUPS ) ) {