question: public static void registerApp ( int application , String appName ) throws AppIDException { if ( ( application & APP_ID_MASK ) != application ) { throw new InvalidAppIDValueException ( application ) ; } String oldApp = appIdMap . putIfAbsent ( application , appName ) ; if ( oldApp != null && ! oldApp . equals ( appName ) ) { throw new AppIDInUseException ( application , oldApp , appName ) ; } }
target:  A lame attempt to prevent duplicate application ID. TODO: We should expose appID->appName map via REST API so CLI doesn't need a separate copy of the map.