<commit_before>package org.junit.tests.running.classes;

import static org.junit.Assert.assertEquals;

import org.junit.Test;
import org.junit.experimental.runners.Enclosed;
import org.junit.runner.JUnitCore;
import org.junit.runner.Request;
import org.junit.runner.Result;
import org.junit.runner.RunWith;
import org.junit.runner.Runner;

public class EnclosedTest {
    @RunWith(Enclosed.class)
    public static class Enclosing {
        public static class A {
            @Test public void a() {}
            @Test public void b() {}
        }
        public static class B {
            @Test public void a() {}
            @Test public void b() {}
            @Test public void c() {}
        }
        abstract public static class C {
            @Test public void a() {}
        }
    }
    
    @Test public void enclosedRunnerPlansConcreteEnclosedClasses() throws Exception {
        Runner runner= Request.aClass(Enclosing.class).getRunner();
        assertEquals(5, runner.testCount());
    }
    
    @Test public void enclosedRunnerRunsConcreteEnclosedClasses() throws Exception {
        Result result= JUnitCore.runClasses(Enclosing.class);
        assertEquals(5, result.getRunCount());
    }
    
    @Test public void enclosedRunnerIsNamedForEnclosingClass() throws Exception {
        assertEquals(Enclosing.class.getName(), Request.aClass(Enclosing.class)
                .getRunner().getDescription().getDisplayName());
    }
}<commit_msg>Fixed style (annotations on a separate line)<commit_after>package org.junit.tests.running.classes;

import static org.junit.Assert.assertEquals;

import org.junit.Test;
import org.junit.experimental.runners.Enclosed;
import org.junit.runner.JUnitCore;
import org.junit.runner.Request;
import org.junit.runner.Result;
import org.junit.runner.RunWith;
import org.junit.runner.Runner;

public class EnclosedTest {
    @RunWith(Enclosed.class)
    public static class Enclosing {
        public static class A {
            @Test
            public void a() {}

            @Test
            public void b() {}
        }
        public static class B {
            @Test
            public void a() {}

            @Test
            public void b() {}

            @Test
            public void c() {}
        }
        abstract public static class C {
            @Test public void a() {}
        }
    }

    @Test
    public void enclosedRunnerPlansConcreteEnclosedClasses() throws Exception {
        Runner runner= Request.aClass(Enclosing.class).getRunner();
        assertEquals(5, runner.testCount());
    }

    @Test
    public void enclosedRunnerRunsConcreteEnclosedClasses() throws Exception {
        Result result= JUnitCore.runClasses(Enclosing.class);
        assertEquals(5, result.getRunCount());
    }

    @Test
    public void enclosedRunnerIsNamedForEnclosingClass() throws Exception {
        assertEquals(Enclosing.class.getName(), Request.aClass(Enclosing.class)
                .getRunner().getDescription().getDisplayName());
    }
}
{'fraction_non_alphanumeric': 0.09940357852882704, 'fraction_numerical': 0.0013253810470510272, 'mean_word_length': 2.5601415094339623, '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': '374067', 'n_tokens_mistral': 823, 'n_tokens_neox': 790, 'n_words': 196}