<commit_before>package com.beatsbucket.mashub.kitchen.ingredient;

import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.util.concurrent.Future;

import javax.ws.rs.client.Client;
import javax.ws.rs.client.ClientBuilder;
import javax.ws.rs.core.Feature;

import com.beatsbucket.mashub.kitchen.Fridge;
import org.glassfish.jersey.client.oauth1.AccessToken;
import org.glassfish.jersey.client.oauth1.ConsumerCredentials;
import org.glassfish.jersey.client.oauth1.OAuth1ClientSupport;

import com.beatsbucket.mashub.channel.Channel;
import com.beatsbucket.mashub.channel.OAuth1Channel;

public class Twitter implements Ingred {
	private OAuth1Channel channel;
	
	public boolean tweet(String msg) throws UnsupportedEncodingException {
		// TODO Auto-generated method stub
		Client client = ClientBuilder.newClient();
		
		ConsumerCredentials consumerCredentials = new ConsumerCredentials(
                channel.getConsumerKey(), channel.getConsumerSecret());
		AccessToken storedToken = new AccessToken(
				channel.getCredential().getAccessToken(), 
				channel.getCredential().getAccessTokenSecret());
		
		Feature filterFeature = OAuth1ClientSupport.builder(consumerCredentials)
			    .feature()
			    .accessToken(storedToken)
			    .build();
		
		client.register(filterFeature);
		
		String responseMsg = client.target("https://api.twitter.com/1.1/statuses/update.json?status="+URLEncoder.encode(msg,"UTF-8")).request()
				.property(OAuth1ClientSupport.OAUTH_PROPERTY_ACCESS_TOKEN, storedToken).post(null).toString();

		return true;
	}
	
	@Override
	public <C extends Channel> void loadChannel(C channel) {
		// TODO Auto-generated method stub
		this.channel = (OAuth1Channel) channel;
		
	}

	public void advertise(Fridge fridge) {
		
	}

	public Future cook(String json) {
		return null;
	}

}<commit_msg>Add @Override.<commit_after>package com.beatsbucket.mashub.kitchen.ingredient;

import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.util.concurrent.Future;

import javax.ws.rs.client.Client;
import javax.ws.rs.client.ClientBuilder;
import javax.ws.rs.core.Feature;

import com.beatsbucket.mashub.kitchen.Fridge;
import org.glassfish.jersey.client.oauth1.AccessToken;
import org.glassfish.jersey.client.oauth1.ConsumerCredentials;
import org.glassfish.jersey.client.oauth1.OAuth1ClientSupport;

import com.beatsbucket.mashub.channel.Channel;
import com.beatsbucket.mashub.channel.OAuth1Channel;

public class Twitter implements Ingred {
	private OAuth1Channel channel;
	
	public boolean tweet(String msg) throws UnsupportedEncodingException {
		// TODO Auto-generated method stub
		Client client = ClientBuilder.newClient();
		
		ConsumerCredentials consumerCredentials = new ConsumerCredentials(
                channel.getConsumerKey(), channel.getConsumerSecret());
		AccessToken storedToken = new AccessToken(
				channel.getCredential().getAccessToken(), 
				channel.getCredential().getAccessTokenSecret());
		
		Feature filterFeature = OAuth1ClientSupport.builder(consumerCredentials)
			    .feature()
			    .accessToken(storedToken)
			    .build();
		
		client.register(filterFeature);
		
		String responseMsg = client.target("https://api.twitter.com/1.1/statuses/update.json?status="+URLEncoder.encode(msg,"UTF-8")).request()
				.property(OAuth1ClientSupport.OAUTH_PROPERTY_ACCESS_TOKEN, storedToken).post(null).toString();

		return true;
	}
	
	@Override
	public <C extends Channel> void loadChannel(C channel) {
		// TODO Auto-generated method stub
		this.channel = (OAuth1Channel) channel;
		
	}

	@Override
	public void advertise(Fridge fridge) {

	}

	@Override
	public Future cook(String json) {
		return null;
	}

}
{'fraction_non_alphanumeric': 0.1050363587395637, 'fraction_numerical': 0.006463775922434689, 'mean_word_length': 4.867298578199052, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 2, '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': '3634110', 'n_tokens_mistral': 1205, 'n_tokens_neox': 1106, 'n_words': 199}