<commit_before>package edu.umn.bulletinboard.client.cli;

import edu.umn.bulletinboard.client.Client;
import edu.umn.bulletinboard.client.constants.CommandConstants;
import edu.umn.bulletinboard.client.exceptions.ClientNullException;
import edu.umn.bulletinboard.common.storage.MemStore;

import java.net.MalformedURLException;
import java.rmi.NotBoundException;
import java.rmi.Remote;
import java.rmi.RemoteException;

/**
 *
 * Disconnect the current connection.
 *
 * Created by Abhijeet on 3/30/2014.
 */
public class DisconnectCmd extends BaseCommand {

    public DisconnectCmd(String cmd) {
        super(cmd);
    }

    @Override
    public boolean execute() throws NumberFormatException, RemoteException
            , ClientNullException, MalformedURLException, NotBoundException {

        Client cli = Client.getInstance();

        if (null == cli.getClient()) {
            throw new RemoteException(CommandConstants.ERR_CLIENT_NULL);
        }

        cli.setClient(null);
        cli.setRead(false);
        MemStore.getInstance().getAllArticles().clear();
        return true;
    }
}<commit_msg>Minor glitch in RYW client: cache cleared prematurely.<commit_after>package edu.umn.bulletinboard.client.cli;

import edu.umn.bulletinboard.client.Client;
import edu.umn.bulletinboard.client.constants.CommandConstants;
import edu.umn.bulletinboard.client.exceptions.ClientNullException;
import edu.umn.bulletinboard.common.storage.MemStore;

import java.net.MalformedURLException;
import java.rmi.NotBoundException;
import java.rmi.Remote;
import java.rmi.RemoteException;

/**
 *
 * Disconnect the current connection.
 *
 * Created by Abhijeet on 3/30/2014.
 */
public class DisconnectCmd extends BaseCommand {

    public DisconnectCmd(String cmd) {
        super(cmd);
    }

    @Override
    public boolean execute() throws NumberFormatException, RemoteException
            , ClientNullException, MalformedURLException, NotBoundException {

        Client cli = Client.getInstance();

        if (null == cli.getClient()) {
            throw new RemoteException(CommandConstants.ERR_CLIENT_NULL);
        }

        cli.setClient(null);
        cli.setRead(false);
        return true;
    }
}
{'fraction_non_alphanumeric': 0.0966576332429991, 'fraction_numerical': 0.006323396567299007, 'mean_word_length': 3.604989604989605, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4628701', 'n_tokens_mistral': 655, 'n_tokens_neox': 632, 'n_words': 126}