2025 ASEE Annual Conference & Exposition

Addressing open-source software complexity using a large language model

Presented at Software Engineering Division (SWED) Technical Session 3

Open-source software (OSS) projects are often used in software-engineering education to provide students with practical experience. However, these projects often suffer from short lifespans, primarily due to unwieldy design structures. This issue is exacerbated by students’ inadequate design skills, which are further hindered by their limited engagement with the project codebase, typically spanning only a few weeks. Consequently, students tend to make several kinds of errors that tend to propogate and produce unreadable and unreliable code.

Students frequently violate the Don’t Repeat Yourself (DRY) principle by duplicating code instead of studying the code base to identify reusable methods, adversely impacting maintainability. Students often deviate from other design principles. Because they are reluctant to modify classes they are unfamiliar with, they tend to write methods in other classes that manipulate the representation of these objects, thus violating the Law of Demeter. Rather than extending inheritance hierarchies, they tend to insert conditional statements into existing methods, which undermines the purity of the design. Furthermore, students often neglect the Single-Responsibility Principle, conflating multiple functionalities in a single class, making classes harder to comprehend at a glance.

Another significant issue is the lack of emphasis on comments and documentation. Students typically view these as secondary tasks, resulting in insufficient documentation that hampers future code maintenance and understanding.

To address these challenges, we are exploring the application of a Large Language Model (LLM) to enhance students’ coding practices. The LLM is being trained to recognize common pitfalls in student code, such as violations of design principles and poor documentation practices. Preliminary results indicate that the LLM can effectively identify and suggest improvements, thereby potentially transforming the way students approach OSS projects. This approach not only aims to improve the quality and longevity of student-led OSS projects but also enhances students’ design skills and adherence to best practices in software engineering.

Authors
  1. David Mond North Carolina State University at Raleigh
Download paper (1.72 MB)