Abstract
Lecturers of introductory programming courses are often faced with the challenge of supervising a large number of students. Reviewing a large number of programming exercises is time-consuming, and an automated overview of the available solution approaches would be helpful. In this paper, we focus on source code similarity at the level of students’ selected solution approaches. We propose a method to compare Java classes using variable usage paths (VUPs) extracted from modified abstract syntax trees (ASTs). The proposed approach involves matching semantically equivalent functions and attributes between classes by comparing their VUPs. We define a \(F_1\)-based similarity measure on how well one student submission matches another. We evaluate our approach using students’ submissions from an introductory programming exercise and the results indicate the effectiveness of our method in identifying different solution approaches. The proposed approach outperforms simplified comparisons and the widely used plagiarism detection tool JPlag in accurately grouping submissions by solution approach similarity.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
Notes
- 1.
Note that variable names themselves are not valid identifiers, as the same name may be used twice for variables in different functions. From the AST, we extract a unique node identifier for each variable. But in this paper, for simplification and readability, we use the variable names as identifiers.
- 2.
or remain unassigned in case no counterpart exists.
References
Hellendoorn, V.J., Devanbu, P.: Are deep neural networks the best choice for modeling source code? In: Proceedings of the 11th Joint Meeting on Foundation of Software Engineering, pp. 763–773 (2017)
Höppner, F.: Grouping source code by solution approaches - improving feedback in programming courses. In: Proceedings of the 14th International Conference on Educational Data Mining (2021)
Joyner, D., et al.: From clusters to content: using code clustering for course improvement. In: Proceedings of the 50th ACM Technical Symposium on Computer Science Education, pp. 780–786 (2019)
Munkres, M.: Algorithms for the assignment and transportation problems. J. Soc. Ind. Appl. Math. 5(1), 32–38 (1957)
Prechelt, L., Malpohl, G., Phlippsen, M.: JPlag: Finding Plagiarisms Among a Set of Programs. University of Karlsruhe, Tech. rep. (2000)
Sager, T., Bernstein, A., Pinzger, M., Kiefer, C.: Detecting similar java classes using tree algorithms. In: Proceedings of the 2006 International Workshop on Mining Software Repositories, pp. 65–71 (2006)
Zhang, J., Wang, X., Zhang, H., Sun, H., Wang, K., Liu, X.: A novel neural source code representation based on abstract syntax tree. In: 2019 IEEE/ACM 41st International Conference on Software Engineering, pp. 783–794. IEEE (2019)
Acknowledgements
This work was partly funded by the German Federal Ministry of Education and Research under the grant no. 16DHBKI056 (ki4all).
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2024 The Author(s), under exclusive license to Springer Nature Switzerland AG
About this paper
Cite this paper
Brauner, L.E., Höppner, F. (2024). Enhancing Computer Science Education by Automated Analysis of Students’ Code Submissions. In: Nowaczyk, S., et al. Artificial Intelligence. ECAI 2023 International Workshops. ECAI 2023. Communications in Computer and Information Science, vol 1948. Springer, Cham. https://doi.org/10.1007/978-3-031-50485-3_37
Download citation
DOI: https://doi.org/10.1007/978-3-031-50485-3_37
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-031-50484-6
Online ISBN: 978-3-031-50485-3
eBook Packages: Computer ScienceComputer Science (R0)