#vulnerable code 
                                @Override
    public boolean resetSystem(String reason) {
        if ((TimeService.currentTimeMillis() - lastResetTime) <= INTERVAL_TIME) {
            Log.info("system reset interrupt!");
            return true;
        }
        Log.info("---------------reset start----------------");
        Log.info("Received a reset system request, reason: 【" + reason + "】");

        NetworkService networkService = NulsContext.getServiceBean(NetworkService.class);
        networkService.reset();

        DownloadService downloadService = NulsContext.getServiceBean(DownloadService.class);
        downloadService.reset();

        NulsContext.getServiceBean(LedgerService.class).resetLedgerCache();

        ConsensusMeetingRunner consensusMeetingRunner = ConsensusMeetingRunner.getInstance();
        consensusMeetingRunner.resetConsensus();

        Log.info("---------------reset end----------------");

        this.lastResetTime = TimeService.currentTimeMillis();

        return true;
    } 
                            #location 16 
                            #vulnerability type NULL_DEREFERENCE
#fixed code
                                @Override
    public boolean resetSystem(String reason) {
        if ((TimeService.currentTimeMillis() - lastResetTime) <= INTERVAL_TIME) {
            Log.info("system reset interrupt!");
            return true;
        }
        Log.info("---------------reset start----------------");
        Log.info("Received a reset system request, reason: 【" + reason + "】");

        NetworkService networkService = NulsContext.getServiceBean(NetworkService.class);
        networkService.reset();

        DownloadService downloadService = NulsContext.getServiceBean(DownloadService.class);
        downloadService.reset();

        ConsensusManager.getInstance().clearCache();

        Log.info("---------------reset end----------------");

        this.lastResetTime = TimeService.currentTimeMillis();

        return true;
    }