<commit_before>// tag::after-evaluate[]
allprojects {
    afterEvaluate {
        if (extra["hasTests"] as Boolean) {
            println("Adding test task to $project")
            tasks.register("test") {
                doLast {
                    println("Running tests for $project")
                }
            }
        }
    }
}
// end::after-evaluate[]

allprojects {
    extra["hasTests"] = false
}<commit_msg>Move default assignment in sample<commit_after>// tag::after-evaluate[]
allprojects {
    // Set a default value
    extra["hasTests"] = false

    afterEvaluate {
        if (extra["hasTests"] as Boolean) {
            println("Adding test task to $project")
            tasks.register("test") {
                doLast {
                    println("Running tests for $project")
                }
            }
        }
    }
}
// end::after-evaluate[]
{'fraction_non_alphanumeric': 0.12542759407069556, 'fraction_numerical': 0.0, 'mean_word_length': 1.6366366366366367, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '4744960', 'n_tokens_mistral': 244, 'n_tokens_neox': 223, 'n_words': 53}