Microsoft created the methods2test dataset, consisting of Java Junit test cases with their corresponding focal methods.
It contains 780k pairs of JUnit test cases and focal methods which were extracted from a total of 91K Java open-source projects hosted on GitHub.
This is a smaller subset of the assembled version of the methods2test dataset.
It provides convenient access to the different context levels based on the raw source code (e.g. newlines are preserved).… See the full description on the dataset page:
https://huggingface.co/datasets/andstor/methods2test_small.