<commit_before>
package com.example.bot.spring.echo;

import com.linecorp.bot.client.LineMessagingServiceBuilder;
import com.linecorp.bot.model.PushMessage;
import com.linecorp.bot.model.message.TextMessage;
import com.linecorp.bot.model.response.BotApiResponse;
import java.io.IOException;
import java.util.ArrayList;
import lombok.NonNull;
import retrofit2.Response;

/**
 * <p>A Hand of Uno cards, held by a particular player. A Hand object is
 * responsible for playing a Card (<i>i.e.</i>, actually choosing a card to
 * play) when the player's turn comes up. To do this, it implements the
 * strategy pattern by which this choice can be delegated to an arbitrary
 * implementer of the UnoPlayer class.</p>
 * @since 1.0
 */
public class Hand {

    private ArrayList<Card> cards;
    private UnoPlayer player;
    private String playerName;

    /**
     * Instantiate a Hand object to be played by the UnoPlayer class, and
     * the player name, passed as arguments. This implements a strategy
     * pattern whereby the constructor accepts various strategies that
     * implement the UnoPlayer interface.
     */
    public Hand(String unoPlayerClassName, String playerName, String userId) throws IOException {
        this.pushText(userId, "before try");
        try {
            player = (UnoPlayer)
                Class.forName(unoPlayerClassName).newInstance();
        }
        catch (Exception e) {
            //System.out.println("Problem with " + unoPlayerClassName + ".");
            this.pushText(userId, "error try"+e.getMessage());
            e.printStackTrace();
            System.exit(1);
        }
        this.playerName = playerName;
        cards = new ArrayList<Card>();
    }

     private void pushText(@NonNull String userId, @NonNull String messages) throws IOException {
       TextMessage textMessage = new TextMessage(messages);
PushMessage pushMessage = new PushMessage(
        userId,
        textMessage
);

Response<BotApiResponse> response =
        LineMessagingServiceBuilder
                .create("EUMai2WNIC2Qu7jgkGqcCJ/D1BGXlQQmmHKxMaNSnkLq5NKWYMEMaD7wHScPrMPTQdSAnB/zslXaGHg7+EsuzRvmIL7AoSqiWfkqkFUKfCO4LGlUyeHXuv97gDb9DwwnuMrpWFiqqJiGY0lrVjfgzwdB04t89/1O/w1cDnyilFU=")
                .build()
                .pushMessage(pushMessage)
                .execute();
System.out.println(response.code() + " " + response.message());
    }
    /**
     * Add (draw) a card to the hand.
     */
    void addCard(Card c) {
        cards.add(c);<commit_msg>test replytext 1/02/60 ver 15<commit_after>
package com.example.bot.spring.echo;

import com.linecorp.bot.client.LineMessagingServiceBuilder;
import com.linecorp.bot.model.PushMessage;
import com.linecorp.bot.model.message.TextMessage;
import com.linecorp.bot.model.response.BotApiResponse;
import java.io.IOException;
import java.util.ArrayList;
import lombok.NonNull;
import retrofit2.Response;

/**
 * <p>A Hand of Uno cards, held by a particular player. A Hand object is
 * responsible for playing a Card (<i>i.e.</i>, actually choosing a card to
 * play) when the player's turn comes up. To do this, it implements the
 * strategy pattern by which this choice can be delegated to an arbitrary
 * implementer of the UnoPlayer class.</p>
 * @since 1.0
 */
public class Hand {

    private ArrayList<Card> cards;
    private UnoPlayer player;
    private String playerName;

    /**
     * Instantiate a Hand object to be played by the UnoPlayer class, and
     * the player name, passed as arguments. This implements a strategy
     * pattern whereby the constructor accepts various strategies that
     * implement the UnoPlayer interface.
     */
    public Hand(String unoPlayerClassName, String playerName, String userId) throws IOException, InstantiationException, IllegalAccessException {
        this.pushText(userId, "before try");
        try {
            player = (UnoPlayer)
                Class.forName(unoPlayerClassName).newInstance();
        }
        catch (ClassNotFoundException e) {
            //System.out.println("Problem with " + unoPlayerClassName + ".");
            this.pushText(userId, "error try "+e.getMessage());
            e.printStackTrace(); 
            System.exit(1);
        }
        this.playerName = playerName;
        cards = new ArrayList<Card>();
    }

     private void pushText(@NonNull String userId, @NonNull String messages) throws IOException {
       TextMessage textMessage = new TextMessage(messages);
PushMessage pushMessage = new PushMessage(
        userId,
        textMessage
);

Response<BotApiResponse> response =
        LineMessagingServiceBuilder
                .create("<KEY>
                .build()
                .pushMessage(pushMessage)
                .execute();
System.out.println(response.code() + " " + response.message());
    }
    /**
     * Add (draw) a card to the hand.
     */
    void addCard(Card c) {
        cards.add(c);
{'fraction_non_alphanumeric': 0.09508329947175945, 'fraction_numerical': 0.00690776107273466, 'mean_word_length': 2.8855564325177583, 'pattern_counts': {'":': 0, '<': 18, '<?xml version=': 0, '>': 18, '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': '4629521', 'n_tokens_mistral': 1424, 'n_tokens_neox': 1379, 'n_words': 394}