📖 Reading the results only? You don't need this guide. Go back to the Case README for navigation.
🛠️ Reproducing the full pipeline? Continue below.
| Requirement | Purpose |
|---|---|
| JDK 17 | Compile the instrumentation tool |
| JDK 21 | Compile Spring Boot 3.x and run the reproducer |
| Maven | Build the instrumentation tool and the reproducer |
| Gradle | Build Spring Boot from source |
| Spring Boot source (matching the issue version) | Instrumentation target |
| ~30–60 min | Mostly compilation time |
If you get stuck at any step, the pre-generated artifacts under this directory serve as the expected output for reference:
| Step | Expected output | Reference location |
|---|---|---|
| Step 2 — Instrument | comment-mapping.txt, event_dictionary.txt |
(generated in working directory) |
| Step 4 — Collect logs | instrumentor-log-*.txt, instrumentor-events-*.txt |
(generated in reproducer directory) |
| Step 6 — Denoise | calltree.md/json, combined.md/json, happensbefore.md/json |
1_runtime_evidence/ |
| Step 7 — Generate prompt | AI_Bug_Localization_Prompt.md |
2_ai_prompt/ |
| Step 8 — AI response | Bug_Localization_and_Fix_Plan.md |
3_ai_response/ |
cd \path\to\scenario-based-runtime-context-for-ai
$env:JAVA_HOME="/path/to/jdk17" ; $env:Path="$env:JAVA_HOME\bin;$env:Path"
mvn -f .\poc\pom.xml clean install -DskipTestsAdd the following paths to target-folders.txt:
/path/to/spring-boot/spring-boot-project
.\run-instrumentation-demo.ps1 -TargetFoldersFile ".\target-folders.txt" -SkipBuildAndTestOutput (generated in working directory):
comment-mapping.txtevent_dictionary.txt
Apply the following changes:
subprojects {
apply plugin: "org.springframework.boot.conventions"
repositories {
mavenCentral()
+ maven {
+ url = uri("file:///D:/maven/repository")
+ }
spring.mavenRepositories()
}
+ plugins.withType(JavaPlugin) {
+ dependencies {
+ implementation "com.example:instrumentor-log-monitor:1.0-SNAPSHOT"
+ }
}
configurations.all {
resolutionStrategy.cacheChangingModulesFor 0, "minutes"
}
}
+// skipAllTests
+if (System.properties.containsKey('skipAllTests')) {
+ allprojects {
+ afterEvaluate {
+ tasks.configureEach { task ->
+ if (task instanceof Test) {
+ task.enabled = false
+ }
+ String nameLower = task.name.toLowerCase()
+ if (nameLower.contains('test') || nameLower.contains('check') || nameLower.contains('javadoc')) {
+ task.enabled = false
+ }
+ }
+ }
+ }
+}Apply the following changes:
repositories {
mavenCentral()
+ maven {
+ url = uri("file:///D:/maven/repository")
+ }
spring.mavenRepositoriesFor("${springFrameworkVersion}")
gradlePluginPortal()
}
+// skipAllTests: Controlled by system property -D to ensure it takes effect for buildSrc as well
+if (System.properties.containsKey('skipAllTests')) {
+ tasks.configureEach { t ->
+ String nameLower = t.name.toLowerCase()
+ if (nameLower.contains('test') || nameLower.contains('check') || nameLower.contains('checkstyle')) {
+ t.enabled = false
+ }
+ }
+ jar.setDependsOn(jar.dependsOn.findAll { it.toString() != 'check' })
+} else {
jar.dependsOn check
+}$env:JAVA_HOME="/path/to/jdk21" ; $env:Path="$env:JAVA_HOME/bin;$env:Path"
cd /path/to/spring-boot
./gradlew clean publishToMavenLocal `
-x :spring-boot-project:spring-boot-docs:publishToMavenLocal `
-x :spring-boot-project:spring-boot-tools:spring-boot-cli:publishToMavenLocal `
--no-build-cache -DskipAllTestsThe reproducer source is in the reproducer/ directory.
$env:JAVA_HOME="/path/to/jdk21" ; $env:Path="$env:JAVA_HOME/bin;$env:Path"
cd /path/to/spring-boot-50021/reproducer
mvn clean compile dependency:copy-dependencies -DoutputDirectory=target/lib
java -cp "target\classes;target\lib\*" com.example.ReproducerApplication
⚠️ Tip: Keep only the minimal code needed to reproduce the bug to avoid log explosion.
Output (generated in reproducer directory):
instrumentor-events-yyyymmdd_hhmmss-shutdown.txtinstrumentor-log-yyyymmdd_hhmmss-shutdown.txt
cd /path/to/spring-boot ; git restore . ; git clean -fd .cd \path\to\scenario-based-runtime-context-for-ai
$env:JAVA_HOME="/path/to/jdk17" ; $env:Path="$env:JAVA_HOME\bin;$env:Path"
.\process-logs-demo.ps1 `
-TargetFoldersFile ".\target-folders.txt" `
-LogFile "/path/to/reproducer/instrumentor-log-yyyymmdd_hhmmss-shutdown.txt" `
-CommentMappingFile ".\comment-mapping.txt" `
-EventsFile "/path/to/reproducer/instrumentor-events-yyyymmdd_hhmmss-shutdown.txt"Output — these correspond to the artifacts in 1_runtime_evidence/:
| Generated file | Corresponds to |
|---|---|
final-output-calltree.md |
1_runtime_evidence/calltree.md |
final-output-calltree.json |
1_runtime_evidence/calltree.json |
final-output-combined.md |
1_runtime_evidence/combined.md |
final-output-combined.json |
1_runtime_evidence/combined.json |
final-output-happensbefore.md |
1_runtime_evidence/happensbefore.md |
final-output-happensbefore.json |
1_runtime_evidence/happensbefore.json |
cd \path\to\scenario-based-runtime-context-for-ai\poc\denoised-data-ai-app
python generate_bug_localization_prompt.pyFollow the interactive prompts to input the relevant information.
Output — corresponds to 2_ai_prompt/AI_Bug_Localization_Prompt.md
Feed the generated prompt to the LLM.
Output — corresponds to 3_ai_response/Bug_Localization_and_Fix_Plan.md
The core fix identified through this workflow aligns exactly with the official Spring Boot commit:
Commit: edcc937
← Back to Case README