Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Exploring Java OSS with LLMs - A New Way to App...

Exploring Java OSS with LLMs - A New Way to Approach Open-Source Code Reading

Avatar for Hiroshi Ito

Hiroshi Ito

May 19, 2025
Tweet

More Decks by Hiroshi Ito

Other Decks in Technology

Transcript

  1. 0 Exploring Java OSS with LLMs: A New Way to

    Approach Open-Source Code Reading April 23rd, 2025 Hiroshi Ito Executive Officer / CTO Loglass
  2. 1 Exploring Java OSS with LLMs: Self Introduction After joining

    Goldman Sachs' Technology Division as a new graduate, he involved in the development of the company’s core systems. Later, as a VP/Senior Engineer, he contributed to platform development and spearheaded the company’s open-source software (OSS) strategy. After working at two startups, he joined READYFOR as an Executive Officer and Vice President of Engineering (VPoE), where he managed the engineering organization, led the overhaul of the payment infrastructure, and spearheaded new product development. In October 2022, he joined Loglass Inc. as an engineer in the Development Department. After serving as an Engineering Manager (EM) and VPoE, he was appointed Executive Officer and CTO in November 2024. Loglass Inc. Executive Officer, CTO Hiroshi Ito Hiroshi Ito
  3. 2 Exploring Java OSS with LLMs The theme was "Exploring

    Java OSS with LLMs: A New Way to Approach Open-Source Code Reading." 6 Month Ago, I submitted this proposal
  4. 3 Exploring Java OSS with LLMs And Today, Looking Around

    GIDS sessions.... AI! AI! AI! It's the topic everywhere! All Screenshots are from https://developersummit.com/session/ © 2025-2026 Saltmarch. All rights reserved.
  5. 4 Exploring Java OSS with LLMs Which Leads to a

    Big Question... Will We Keep Reading & Writing Code? Image Credit: ChatGPT/Dall-E, 2025
  6. 5 Exploring Java OSS with LLMs • It's a traditional

    Japanese art form – recreating natural landscapes in a pot. • Characteristics: ◦ Cultivated over many years. ◦ Shaped through careful pruning and tending. ◦ Reflects the creator's aesthetic sense and philosophy. A Bit Sudden, But Do You Know "Bonsai"? In Japan, it's often enjoyed as a hobby in later life.
  7. 6 Exploring Java OSS with LLMs • If AI handles

    most coding tasks in the future... • Would reading & writing code might be.. ◦ A pursuit of deep understanding, cultivated over time? ◦ An act of careful crafting and refinement, like pruning? ◦ A way to express coding aesthetics or philosophy? Or perhaps, simply a refined 'hobby'? Is Code Reading & Writing the Future "Bonsai"? Image Credit: ChatGPT/Dall-E, 2025
  8. 7 Exploring Java OSS with LLMs In this session, however,

    acknowledging it's still too early for the "Bonsai" stage (?), we'll explore how to practically leverage LLMs and AI Agents as useful tools for understanding OSS code today. Well, it might be true, but let’s forget about it Image Credit: ChatGPT/Dall-E, 2025
  9. 8 Exploring Java OSS with LLMs Why would you read

    OSS source code anyways? Image Credit: ChatGPT/Dall-E, 2025 • See real‑world architecture up close – Explore how large projects organise layers and boundaries. • Spot design patterns in action – Notice Strategy, Builder, Reactor and other patterns working together. • Learn how good APIs evolve – Observe how maintainers add features while keeping backward compatibility. • Build your code‑reading stamina – Practise tracing big codebases and finding what matters. • Speed up onboarding for new teammates – Use proven, battle‑tested code as hands‑on learning material.
  10. 9 Exploring Java OSS with LLMs • Learn how LLMs

    can accelerate understanding of complex OSS codebases • Discover practical techniques for using AI to navigate OSS projects • Develop an efficient workflow combining traditional and AI-assisted code reading • Apply these techniques to popular Java frameworks and libraries Session Objectives
  11. 11 Exploring Java OSS with LLMs Want to understand the

    architecture or contribute to that cool Java OSS project! Do You Ever Felt Like This? Image Credit: ChatGPT/Dall-E, 2025
  12. 12 Exploring Java OSS with LLMs Want to understand the

    architecture or contribute to that cool Java OSS project! ...But where to even start? A vast sea of code! Overwhelming! Do You Ever Felt Like This? Image Credit: ChatGPT/Dall-E, 2025
  13. 13 Exploring Java OSS with LLMs • Read the manual

    • Source code deep dive • Find usages: Search for keywords or method calls • Use debugger yourself to go through the code path Result: Time-consuming, prone to frustration, hard to even take the first step. The Old Ways of Tackling the "Code Mountain" Image Credit: ChatGPT/Dall-E, 2025
  14. 14 Exploring Java OSS with LLMs Spring Framework: Untangling the

    bean lifecycle from creation to destruction – how does Spring manage dependencies across hundreds of classes while maintaining circular reference detection? Hibernate ORM: Deciphering lazy loading proxies and collection wrappers – where in the codebase does bytecode enhancement happen and how does it intercept property access? Netty: Tracing asynchronous operations through event loops – following a request from channel registration to completion callback across multiple thread contexts. Apache Kafka: Tracking message flow from producer to consumer – how does offset management work across multiple partitions and consumer group instances? Understanding OSS Internal Code Can Be Hard
  15. 15 Exploring Java OSS with LLMs Where should I start

    reading? How can I grasp the overall picture? Which are the main classes or modules? Where is the code related to this specific feature? Facing vast code, what I need first is a "map"! This "first step" hurdle is extremely high. The Biggest Hurdle: The "First Step"
  16. 16 Exploring Java OSS with LLMs A Savior Appears? Enter

    AI Assistants Image Credit: ChatGPT/Dall-E, 2025
  17. 17 Exploring Java OSS with LLMs Summarization: Tells you the

    purpose/role of the whole project, modules, or classes. Structure Explanation: Explains the rough architecture and relationships between key components. Identifying Key Parts: "Where is feature xxx located?" → Suggests relevant code locations. Illustration: Visualize the key concept with image or modeling notation e.g. mermaid Deep dive with repeated Q&A: Answers "What is the purpose of xx ?", “Why this code is written this way?” etc. How AI Helps the "First Step"
  18. 19 Exploring Java OSS with LLMs Hello ChatGPT, I’d like

    to dive into the Spring Boot source code to grasp its high‑level architecture and then perform an in‑depth analysis of some of its core features. Could you please start by providing an overview of Spring Boot and outline an effective step‑by‑step approach for reading its code? Let’s get started!! Image Credit: ChatGPT/Dall-E, 2025
  19. 21 Exploring Java OSS with LLMs Opinionated Spring Spring Boot

    builds on the core Spring Framework by applying “convention over configuration.” It auto‑configures your application based on the jars on your classpath and sensible defaults, so you can get a production‑ready app up and running with minimal XML or Java configuration. Key Goals 1. Quick Start: Embed a servlet container (Tomcat, Jetty) so you can java -jar your app. 2. Minimal Boilerplate: Provide starter POMs (spring-boot-starter-*) that bring in a curated set of dependencies. 3. Production‑Ready Features: Include health checks, metrics, externalized configuration, and more out of the box. 1. What Is Spring Boot and Why It Exists
  20. 22 Exploring Java OSS with LLMs SpringApplication • Entry point

    (SpringApplication.run(...)): boots the entire framework, sets up the ApplicationContext, triggers auto‑configuration, and then calls any CommandLineRunner or ApplicationRunner beans. Auto‑Configuration • Lives in the spring-boot-autoconfigure module. • Scans for classes annotated with @Configuration and guarded by @ConditionalOn… annotations (e.g. @ConditionalOnClass, @ConditionalOnMissingBean). • Decouples “if X is on classpath, then configure Y” logic into many small auto‑config classes. 2. Core Architectural Building Blocks
  21. 23 Exploring Java OSS with LLMs Starter POMs • Modules

    named spring-boot-starter-* (web, data-jpa, security, etc.). • Bring in the right spring‑boot dependencies without you having to pick versions. Actuator • In spring-boot-actuator. • Exposes operational endpoints (health, metrics, env, loggers) over HTTP or JMX to monitor and manage your app. Developer Tools • spring-boot-devtools for hot reloading, automatic restart, and remote debugging support. CLI • spring-boot-cli lets you write Groovy-based “scripts” that run on Spring Boot. 2. Core Architectural Building Blocks
  22. 24 Exploring Java OSS with LLMs 3. High‑Level Module Structure

    spring-boot/ ├─ spring-boot-project/ │ ├─ spring-boot/ │ ├─ spring-boot-autoconfigure/ │ ├─ spring-boot-actuator/ │ ├─ spring-boot-test/ │ └─ spring-boot-cli/ ├─ docs/ ├─ build-system/ (Gradle scripts) └─ samples/ Tip: Start with spring-boot-autoconfigure to see how each piece (e.g. DataSource, Jackson, Security) wires itself up when relevant classes are present.
  23. 25 Exploring Java OSS with LLMs OK, so let’s start

    with what ChatGPT suggests :) spring-boot-autoconfigure
  24. 45 Exploring Java OSS with LLMs At this point, I

    still didn't have a clear mental model of how the different parts of the source code connected. So I asked ChatGPT to create a sequence diagram to help visualize the flow.
  25. 66 Exploring Java OSS with LLMs o3 is creative enough

    to illustrate the actors Image Credit: ChatGPT/Dall-E, 2025
  26. 67 Exploring Java OSS with LLMs Now I can explore

    code with debugging following ChatGPT’s instructions
  27. 70 Exploring Java OSS with LLMs At this point, you

    can gradually build your mental model with clear image of what each actor is responsible for
  28. 77 Exploring Java OSS with LLMs While debugging, sometimes you

    get lost when the debugger stops many times at the same breakpoint
  29. 82 Exploring Java OSS with LLMs Summarization: Tells you the

    purpose/role of the whole project, modules, or classes. Structure Explanation: Explains the rough architecture and relationships between key components. Identifying Key Parts: "Where is feature xxx located?" → Suggests relevant code locations. Illustration: Visualize the key concept with image or modeling notation e.g. mermaid Deep dive with repeated Q&A: Answers "What is the purpose of xx ?", “Why this code is written this way?” etc. Quick Recap: Here are the overall steps
  30. 85 Exploring Java OSS with LLMs I asked ChatGPT to

    illustrate the data architecture and algorithm of FastList in Eclipse Collections
  31. 88 Exploring Java OSS with LLMs Interestingly it is still

    difficult for ChatGPT o3 to illustrate logical sequence in an image
  32. 89 Exploring Java OSS with LLMs But if I asked

    to create a visualization in a text, it perfectly illustrates the logical sequence!
  33. 90 Exploring Java OSS with LLMs But if I asked

    to create a visualization in a text, it perfectly illustrates the logical sequence!
  34. 91 Exploring Java OSS with LLMs But if I asked

    to create a visualization in a text, it perfectly illustrates the logical sequence!
  35. 92 Exploring Java OSS with LLMs But if I asked

    to create a visualization in a text, it perfectly illustrates the logical sequence!
  36. 100 Exploring Java OSS with LLMs • LLMs provide that

    crucial "map" to help us take the first step into complex codebases • They can explain architecture, summarize code, and identify key components • Visual aids like sequence diagrams and role descriptions add another dimension of understanding • Combining AI assistance with traditional debugging creates a powerful learning workflow ... and it’s fun!!! Enjoy OSS code reading!! Conclusion
  37. 101