Nothing Special   »   [go: up one dir, main page]

skip to main content
10.1109/ICSE-SEET58685.2023.00024acmconferencesArticle/Chapter ViewAbstractPublication PagesicseConference Proceedingsconference-collections
research-article

GradeStyle: GitHub-Integrated and Automated Assessment of Java Code Style

Published: 20 September 2023 Publication History

Abstract

Every programming language has its own style conventions and best practices, which help developers to write readable and maintainable code. Learning code style is an essential skill that every professional software engineer should master. As such, students should develop good habits for code style early on, when they start learning how to program. Unfortunately, manually assessing students' code with timely and detailed feedback is often infeasible, and professional static analysis tools are unsuitable for educational contexts. This paper presents GradeStyle, a tool for automatically assessing the code style of Java assignments. GradeStyle automatically checks for violations of some of the most important Google Java Style conventions, and Java best practices. Students receive a report with a code style mark, a list of violations, and their source code locations. GradeStyle nicely integrates with GitHub and GitHub Classroom, and can be configured to provide continuous feedback every time a student pushes new code. We adopted our tool in a second-year software engineering programming course with 327 students and observed consistent improvements in the code style of their assignments.

References

[1]
A. Tornhill and M. Borg, "Code red: the business impact of code quality - a quantitative study of 39 proprietary production codebases," in TechDebt '22: International Conference on Technical Debt, Pittsburgh Pennsylvania, May 17--18, 2022 (N. A. Ernst, V. Lenarduzzi, and T. Sharma, eds.), pp. 11--20, ACM, 2022.
[2]
H.-M. Chen, B.-A. Nguyen, Y.-X. Yan, and C.-R. Dow, "Analysis of learning behavior in an automated programming assessment environment: A code quality perspective," IEEE Access, vol. 8, pp. 167341--167354, 2020.
[3]
K. Ala-Mutka, T. Uimonen, and H.-M. Jarvinen, "Supporting students in C++ programming courses with automatic program style assessment," Journal of Information Technology Education: Research, vol. 3, pp. 245--262, January 2004.
[4]
E. S. Wiese, A. N. Rafferty, and A. Fox, "Linking code readability, structure, and comprehension among novices: It's complicated," in 2019 IEEE/ACM 41st International Conference on Software Engineering: Software Engineering Education and Training (ICSE-SEET), pp. 84--94, 2019.
[5]
H.-M. Chen, W.-H. Chen, and C.-C. Lee, "An automated assessment system for analysis of coding convention violations in Java programming assignments.," J. Inf. Sci. Eng., vol. 34, no. 5, pp. 1203--1221, 2018.
[6]
J. C. Paiva, J. P. Leal, and A. Figueira, "Automated assessment in computer science education: A state-of-the-art review," ACM Trans. Comput. Educ., vol. 22, jun 2022.
[7]
S. H. Edwards, N. Kandru, and M. B. Rajagopal, "Investigating static analysis errors in student Java programs," in Proceedings of the 2017 ACM Conference on International Computing Education Research, ICER '17, (New York, NY, USA), p. 65--73, ACM, 2017.
[8]
G. De Ruvo, E. Tempero, A. Luxton-Reilly, G. B. Rowe, and N. Giacaman, "Understanding semantic style by analysing student code," in Proceedings of the 20th Australasian Computing Education Conference, ACE '18, (New York, NY, USA), p. 73--82, ACM, 2018.
[9]
P. Ardimento, M. L. Bernardi, and M. Cimitile, "Software analytics to support students in object-oriented programming tasks: An empirical study," IEEE Access, vol. 8, pp. 132171--132187, 2020.
[10]
"Checkstyle." https://checkstyle.org, Accessed: Oct 2022.
[11]
"PMD." https://pmd.github.io, Accessed: Oct 2022.
[12]
"SonarQube." https://www.sonarqube.org, Accessed: Oct 2022.
[13]
C. Vassallo, S. Panichella, F. Palomba, S. Proksch, A. Zaidman, and H. C. Gall, "Context is king: The developer perspective on the usage of static analysis tools," in 25th International Conference on Software Analysis, Evolution and Reengineering, pp. 38--49, 2018.
[14]
B. Johnson, Y. Song, E. Murphy-Hill, and R. Bowdidge, "Why don't software developers use static analysis tools to find bugs?," in 35th International Conference on Software Engineering, pp. 672--681, 2013.
[15]
H. Keuning, B. Heeren, and J. Jeuring, "A tutoring system to learn code refactoring," in Proceedings of the 52nd ACM Technical Symposium on Computer Science Education, SIGCSE '21, (New York, NY, USA), p. 562--568, ACM, 2021.
[16]
R. Luukkainen, J. Kasurinen, U. Nikula, and V. Lenarduzzi, "ASPA: A static analyser to support learning and continuous feedback on programming courses. an empirical validation," in 2022 IEEE/ACM 44th International Conference on Software Engineering: Software Engineering Education and Training (ICSE-SEET), pp. 29--39, 2022.
[17]
L. C. Ureel II and C. Wallace, "Automated critique of early programming antipatterns," in Proceedings of the 50th ACM Technical Symposium on Computer Science Education, SIGCSE '19, (New York, NY, USA), p. 738--744, ACM, 2019.
[18]
N. Körber, K. Geldreich, A. Stahlbauer, and G. Fraser, "Finding anomalies in scratch assignments," in 43rd IEEE/ACM International Conference on Software Engineering: Software Engineering Education and Training, ICSE (SEET) 2021, Madrid, Spain, May 25--28, 2021, pp. 171--182, IEEE, 2021.
[19]
X. Liu, S. Wang, P. Wang, and D. Wu, "Automatic grading of programming assignments: an approach based on formal semantics," in Proceedings of the 41st International Conference on Software Engineering: Software Engineering Education and Training, ICSE (SEET) 2019, Montreal, QC, Canada, May 25--31, 2019 (S. Beecham and D. E. Damian, eds.), pp. 126--137, IEEE / ACM, 2019.
[20]
H. Keuning, J. Jeuring, and B. Heeren, "A systematic literature review of automated feedback generation for programming exercises," ACM Trans. Comput. Educ., vol. 19, no. 1, 2018.
[21]
Callum Iddon, Nasser Giacaman, and Valerio Terragni, "Gradestyle." https://github.com/Digital-Educational-Engineering/gradestyle.
[22]
J. Hong, "The use of java as an introductory programming language," XRDS: Crossroads, The ACM Magazine for Students, vol. 4, no. 4, pp. 8--13, 1998.
[23]
Y.-C. Tu, V. Terragni, E. Tempero, A. Shakil, A. Meads, N. Giacaman, A. Fowler, and K. Blincoe, "Github in the classroom: Lessons learnt," in Australasian Computing Education Conference, ACE '22, (New York, NY, USA), p. 163--172, ACM, 2022.
[24]
Oracle, "Oracle's code conventions for the java programming language." https://www.oracle.com/java/technologies/javase/codeconventions-contents.html, Accessed: Oct 2022.
[25]
Google, "Google java style guide." https://google.github.io/styleguide/javaguide.html, Accessed: Oct 2022.
[26]
A. Trautsch, S. Herbold, and J. Grabowski, "A longitudinal study of static analysis warning evolution and the effects of PMD on software quality in Apache open source projects," Empirical Software Engineering, vol. 25, no. 6, pp. 5137--5192, 2020.
[27]
A. Birillo, I. Vlasov, A. Burylov, V. Selishchev, A. Goncharov, E. Tikhomirova, N. Vyahhi, and T. Bryksin, "Hyperstyle: A tool for assessing the code quality of solutions to programming assignments," in Proceedings of the 53rd ACM Technical Symposium on Computer Science Education, (New York, NY, USA), p. 307--313, ACM, 2022.
[28]
L. Yujian and L. Bo, "A normalized levenshtein distance metric," IEEE transactions on pattern analysis and machine intelligence, vol. 29, no. 6, pp. 1091--1095, 2007.
[29]
E. Juergens, F. Deissenboeck, B. Hummel, and S. Wagner, "Do code clones matter?," in 2009 IEEE 31st International Conference on Software Engineering, pp. 485--495, IEEE, 2009.
[30]
V. Saini, F. Farmahinifarahani, H. Sajnani, and C. Lopes, "Oreo: Scaling clone detection beyond near-miss clones," in Code Clone Analysis, pp. 63--74, Springer, 2021.
[31]
R. Tiarks, R. Koschke, and R. Falke, "An assessment of type-3 clones as detected by state-of-the-art tools," in 2009 Ninth IEEE International Working Conference on Source Code Analysis and Manipulation, pp. 67--76, IEEE, 2009.
[32]
M. S. Uddin, C. K. Roy, K. A. Schneider, and A. Hindle, "On the effectiveness of simhash for detecting near-miss clones in large scale software systems," in 2011 18th Working Conference on Reverse Engineering, pp. 13--22, IEEE, 2011.
[33]
C. Ott, A. Robins, and K. Shephard, "Translating principles of effective feedback for students into the cs1 context," ACM Trans. Comput. Educ., vol. 16, jan 2016.
[34]
Danny van Bruggen, "The most popular parser for the Java language." http://javaparser.org, Accessed: Oct 2022.
[35]
YourKit, LLC, "Java API for creating, reading and updating dictionaries in WordNet format." https://extjwnl.sourceforge.net/, Accessed: Oct 2022.
[36]
PMD Team, "JGit: Java library implementing the Git version control system:." https://www.eclipse.org/jgit, Accessed: Oct 2022.
[37]
Kohsuke Kawaguchi, "GitHub-API for Java." https://github-api.kohsuke.org, Accessed: Oct 2022.
[38]
D. Salter, "The challenge of feedback: Too little too late," in Proceedings of EdMedia + Innovate Learning 2008 (J. Luca and E. R. Weippl, eds.), (Vienna, Austria), pp. 3925--3926, Association for the Advancement of Computing in Education (AACE), June 2008.
[39]
"Error Prone." http://errorprone.info. Accessed: October 2022.
[40]
"SpotBugs." https://spotbugs.github.io. Accessed: October 2022.
[41]
B. P. Cipriano, N. Fachada, and P. Alves, "Drop Project: An automatic assessment tool for programming assignments," SoftwareX, vol. 18, pp. 1--7, 2022.
[42]
H. Keuning, B. Heeren, and J. Jeuring, "Code quality issues in student programs," in Proceedings of the 2017 ACM Conference on Innovation and Technology in Computer Science Education, ITiCSE 2017, Bologna, Italy, July 3--5, 2017, pp. 110--115, ACM, 2017.
[43]
O. Karnalim and Simon, "Promoting code quality via automated feedback on student submissions," in IEEE Frontiers in Education Conference, FIE 2021, Lincoln, NE, USA, October 13--16, 2021, pp. 1--5, IEEE, 2021.

Cited By

View all
  • (2024)Developing Automatic Methods for Teaching Code Quality in Introductory ProgrammingProceedings of the 2024 on Innovation and Technology in Computer Science Education V. 210.1145/3649405.3659536(826-827)Online publication date: 8-Jul-2024

Recommendations

Comments

Please enable JavaScript to view thecomments powered by Disqus.

Information & Contributors

Information

Published In

cover image ACM Conferences
ICSE-SEET '23: Proceedings of the 45th International Conference on Software Engineering: Software Engineering Education and Training
May 2023
348 pages
ISBN:9798350322590

Sponsors

In-Cooperation

  • IEEE CS

Publisher

IEEE Press

Publication History

Published: 20 September 2023

Check for updates

Author Tags

  1. computing education
  2. code style
  3. programming courses
  4. automated marking
  5. GitHub
  6. Java programming language

Qualifiers

  • Research-article

Conference

ICSE-SEET '23
Sponsor:

Acceptance Rates

Overall Acceptance Rate 276 of 1,856 submissions, 15%

Upcoming Conference

ICSE 2025

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)32
  • Downloads (Last 6 weeks)2
Reflects downloads up to 26 Sep 2024

Other Metrics

Citations

Cited By

View all
  • (2024)Developing Automatic Methods for Teaching Code Quality in Introductory ProgrammingProceedings of the 2024 on Innovation and Technology in Computer Science Education V. 210.1145/3649405.3659536(826-827)Online publication date: 8-Jul-2024

View Options

Get Access

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media