<commit_before>package com.brajagopal.rmend.be.utils.bots;

import com.brajagopal.rmend.be.beans.AutomationBotTraceBean;
import com.brajagopal.rmend.be.service.resources.BaseResource;
import com.google.common.collect.HashMultimap;
import com.google.common.collect.Multimap;
import org.apache.http.HttpResponse;
import org.apache.http.util.EntityUtils;

import javax.ws.rs.core.Response;

/**
 * @author <bxr4261>
 */
public class AutomationBaseBot extends BaseResource {

    private Multimap<Response.Status, AutomationBotTraceBean> responseTraceBeans;

    protected final Long uid;
    protected final String topic;

    protected AutomationBaseBot(String _userId, String _topic) {
        responseTraceBeans = HashMultimap.create();

        if (_userId == null) {
            throw new NullPointerException("UID is a required environment variable (cannot be null");
        }

        if (_topic == null) {
            throw new NullPointerException("TOPIC is a required environment variable (cannot be null");
        }

        try {
            this.uid = Long.parseLong(_userId);
        }<commit_msg>Refactored the AutomationBaseBot to make the uid and topic properties less restrictive.<commit_after>package com.brajagopal.rmend.be.utils.bots;

import com.brajagopal.rmend.be.beans.AutomationBotTraceBean;
import com.brajagopal.rmend.be.service.resources.BaseResource;
import com.google.common.collect.HashMultimap;
import com.google.common.collect.Multimap;
import org.apache.commons.cli.BasicParser;
import org.apache.commons.cli.CommandLineParser;
import org.apache.http.HttpResponse;
import org.apache.http.util.EntityUtils;

import javax.ws.rs.core.Response;

/**
 * @author <bxr4261>
 */
public abstract class AutomationBaseBot extends BaseResource {

    private Multimap<Response.Status, AutomationBotTraceBean> responseTraceBeans;
    protected static CommandLineParser cliParser = new BasicParser();

    protected Long uid;
    protected String topic;

    protected AutomationBaseBot(String _userId, String _topic) {
        responseTraceBeans = HashMultimap.create();

        if (_userId == null) {
            throw new NullPointerException("UID is a required environment variable (cannot be null");
        }

        if (_topic == null) {
            throw new NullPointerException("TOPIC is a required environment variable (cannot be null");
        }

        try {
            this.uid = Long.parseLong(_userId);
        }
{'fraction_non_alphanumeric': 0.09090909090909091, 'fraction_numerical': 0.003261312678353037, 'mean_word_length': 3.6389413988657844, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '1695707', 'n_tokens_mistral': 711, 'n_tokens_neox': 686, 'n_words': 170}