<commit_before>/*
 * Copyright (C) 2017 Clivern. <https://clivern.com>
 */
package com.clivern.racter.senders;

import com.clivern.racter.senders.templates.*;

import com.mashape.unirest.http.*;
import com.mashape.unirest.http.async.Callback;
import com.mashape.unirest.http.exceptions.UnirestException;
import com.mashape.unirest.http.options.Options;
import com.mashape.unirest.request.GetRequest;
import com.mashape.unirest.request.HttpRequest;

/**
 * Base Sender Class
 */
public class BaseSender {

	private static BaseSender instance;
	private String remote_url = "https://graph.facebook.com/v2.6/me/messages?access_token=";
	private String access_token;

	/**
	 * Constructor
	 */
	protected BaseSender() { }

	/**
	 * Get Instance
	 *
	 * @return BaseSender
	 */
	public static BaseSender getInstance() {
	    if(instance == null) {
	        instance = new BaseSender();
	    }
	    return instance;
	}

	public BaseSender setAccessToken(String access_token){
		this.access_token = access_token;
		return instance;
	}

	public MessageTemplate getMessageTemplate(){
		return new MessageTemplate();
	}

	public Boolean sendMessageTemplate(MessageTemplate message_template) throws UnirestException {
		String url = this.remote_url + this.access_token;
		String body = message_template.build();
		Unirest.post("https://requestb.in/11rc7mr1").body("curl --header \"Content-type: application/json\" --request POST --data '" + body + "' " + url).asString();
		HttpResponse<String> response = Unirest.post(url).header("Content-Type", "application/json").body(body).asString();

		return true;
	}
}<commit_msg>debug code removed<commit_after>/*
 * Copyright (C) 2017 Clivern. <https://clivern.<EMAIL>>
 */
package com.clivern.racter.senders;

import com.clivern.racter.senders.templates.*;

import com.mashape.unirest.http.*;
import com.mashape.unirest.http.async.Callback;
import com.mashape.unirest.http.exceptions.UnirestException;
import com.mashape.unirest.http.options.Options;
import com.mashape.unirest.request.GetRequest;
import com.mashape.unirest.request.HttpRequest;

/**
 * Base Sender Class
 */
public class BaseSender {

	private static BaseSender instance;
	private String remote_url = "https://graph.facebook.com/v2.6/me/messages?access_token=";
	private String access_token;

	/**
	 * Constructor
	 */
	protected BaseSender() { }

	/**
	 * Get Instance
	 *
	 * @return BaseSender
	 */
	public static BaseSender getInstance() {
	    if(instance == null) {
	        instance = new BaseSender();
	    }
	    return instance;
	}

	public BaseSender setAccessToken(String access_token){
		this.access_token = access_token;
		return instance;
	}

	public MessageTemplate getMessageTemplate(){
		return new MessageTemplate();
	}

	public Boolean sendMessageTemplate(MessageTemplate message_template) throws UnirestException {
		String url = this.remote_url + this.access_token;
		String body = message_template.build();
		HttpResponse<String> response = Unirest.post(url).header("Content-Type", "application/json").body(body).asString();

		return true;
	}
}
{'fraction_non_alphanumeric': 0.12675138481590095, 'fraction_numerical': 0.005213424568263278, 'mean_word_length': 4.414462081128748, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 8, 'https://': 5, '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': '6076899', 'n_tokens_mistral': 1018, 'n_tokens_neox': 958, 'n_words': 191}