STAMP-project / dspot

Automatically detect and generate missing assertions for Junit test cases (also known as test amplification)
https://dspot-demo.stamp-project.eu/
GNU Lesser General Public License v3.0
114 stars 28 forks source link

add support for semantic naming of new variables #830

Closed monperrus closed 5 years ago

monperrus commented 5 years ago

We could use machine learning to predict good names for new variables in amplified tests

See Context2Name: A Deep Learning-Based Approach to Infer Natural Variable Names from Usage Contexts https://arxiv.org/abs/1809.05193

monperrus commented 5 years ago

FYI Jian Gu @ycaxgjd is making good progress on this during his summer internship.

WIP PR to come.

monperrus commented 5 years ago

Related work for the paper

S. Afshan, P. McMinn, and M. Stevenson. Evolving readable string test inputs using a natural language model to reduce human oracle cost. In Proceedings of the 2013 IEEE Sixth International Conference on Software Testing, Verification and Validation, ICST ’13

G. Grano, F. Palomba, and H. C. Gall. Lightweight assessment of test-case effectiveness using source-code-quality indicators. IEEE Transactions on Software Engineering, pages 1–1, 2019

G. Grano, S. Scalabrino, H. C. Gall, and R. Oliveto. An empirical investigation on the readability of manual and generated test cases. In Proceedings of the 26th Conference on Program Comprehension, ICPC ’18

F. Palomba, A. Panichella, A. Zaidman, R. Oliveto, and A. De Lucia. Automatic test case generation: What if test code quality matters? In Proceedings of the 25th International Symposium on Software Testing and Analysis, pages 130–141. ACM, 2016.