System disruptions
There are recurring service disruptions on some of the search portals due to high traffic. We are working to resolve the issue, you may temporarily encounter an error message.
Change search
CiteExportLink to record
Permanent link

Direct link
Cite
Citation style
  • apa
  • ieee
  • modern-language-association-8th-edition
  • vancouver
  • Other style
More styles
Language
  • de-DE
  • en-GB
  • en-US
  • fi-FI
  • nn-NO
  • nn-NB
  • sv-SE
  • Other locale
More languages
Output format
  • html
  • text
  • asciidoc
  • rtf
CodeXView: Leveraging LLMs for Automated Class Collaboration Diagram Generation
Jönköping University, School of Engineering, JTH, Department of Computer Science and Informatics.
Jönköping University, School of Engineering, JTH, Department of Computer Science and Informatics.
2025 (English)Independent thesis Basic level (degree of Bachelor), 10 credits / 15 HE creditsStudent thesis
Abstract [en]

This thesis introduces CodeXView a visualization tool designed to bridge the gap between raw source code and developers' mental picture by automatically generating Class Collaboration Diagrams using a Large Language Model. The CodeXView prototype has been developed as a Visual Studio Code extension in JavaScript to enable easy integration into workflows. CodeXView parses a codebase into an abstract syntax tree via Tree-sitter, then it's converted into PlantUML code through OpenAI's LLM-o1 reasoning model. This generates the Class Collaboration Diagrams that capture runtime class interactions.

To assess the effectiveness of Class Collaboration Diagrams, participants completed a survey involving analyzing two state machine codebases, one accompanied by a diagram and one without. We evaluated their responses to measure both the accuracy of their understanding and the analysis completion time. Although we expected the diagram to enhance comprehension and reduce analysis time, the results showed no significant improvement.

A separate evaluation was conducted to assess the accuracy of the LLM generated diagrams. By generating diagrams and subjecting them to a two-stage validation process: an automated structural check and a manual semantic review. The results showed that diagram accuracy could not be ensured and that the same was true for diagram accuracy over time.However, the tool can process seven programming languages in under 30 milliseconds per file, demonstrating robust cross-language applicability. 

Although the current iteration falls short of practical use without humans' oversight, this work establishes a foundation for automated diagram generation using LLMs. It also identifies key areas for improvement, including prompt engineering, model fine-tuning, and exploration of alternative diagram types.

Place, publisher, year, edition, pages
2025. , p. 46
Keywords [en]
Class Collaboration Diagrams, Large Language Models, Code Architecture, Software Visualization
National Category
Software Engineering
Identifiers
URN: urn:nbn:se:hj:diva-69229OAI: oai:DiVA.org:hj-69229DiVA, id: diva2:1980851
External cooperation
B3 Consulting Group Göteborg
Subject / course
JTH, Computer Engineering
Presentation
2025-05-25, Jönköping, 13:30 (English)
Supervisors
Examiners
Available from: 2025-07-28 Created: 2025-07-02 Last updated: 2025-10-13Bibliographically approved

Open Access in DiVA

fulltext(2168 kB)139 downloads
File information
File name FULLTEXT01.pdfFile size 2168 kBChecksum SHA-512
bd5f02ac4c04d03c0be51d0a54529d47d7f6e4d732702c2fdbf46b34c18e3170c81e51ee1b16e39ebc71c8e569550c56ca57c89ea1a769750c47c9650fe75b5f
Type fulltextMimetype application/pdf

By organisation
JTH, Department of Computer Science and Informatics
Software Engineering

Search outside of DiVA

GoogleGoogle Scholar
Total: 142 downloads
The number of downloads is the sum of all downloads of full texts. It may include eg previous versions that are now no longer available

urn-nbn

Altmetric score

urn-nbn
Total: 698 hits
CiteExportLink to record
Permanent link

Direct link
Cite
Citation style
  • apa
  • ieee
  • modern-language-association-8th-edition
  • vancouver
  • Other style
More styles
Language
  • de-DE
  • en-GB
  • en-US
  • fi-FI
  • nn-NO
  • nn-NB
  • sv-SE
  • Other locale
More languages
Output format
  • html
  • text
  • asciidoc
  • rtf