<commit_before>package com.basics.lambdas;

public class Lambdas {

    public static IAddable<String> stringAdder = (a, b) -> a + b;

    public static String addStrings(String s1, String s2) {
        return String.format("Concatenated Result: "
                + stringAdder.add(s1, s2));
    }

    public static void main(String[] args) {

        String s1 = "This is ";
        String s2 = "a test!";

        String result = addStrings(s1, s2);
        System.out.println(result);
    }
}<commit_msg>Decoupling lambda expression from method implementation<commit_after>package com.basics.lambdas;

public class Lambdas {

    private static IAddable<String> stringAdder = (a, b) -> {
        return String.format("The result is: " + a + b);
    };

    private static void applyBehaviour(IAddable addable, String s1, String s2) {
        System.out.println(addable.add(s1, s2));
    }

    public static void main(String[] args) {

        String s1 = "This is ";
        String s2 = "a test!";

        applyBehaviour(stringAdder, s1, s2);
    }
}
{'fraction_non_alphanumeric': 0.11647727272727272, 'fraction_numerical': 0.015151515151515152, 'mean_word_length': 2.670138888888889, 'pattern_counts': {'":': 0, '<': 5, '<?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': '4727034', 'n_tokens_mistral': 347, 'n_tokens_neox': 332, 'n_words': 92}