Automating Android Build Repair: Bridging the Reasoning-Execution Gap in LLM Agents with Domain-Specific Tools
This paper introduces AndroidBuildBench, a benchmark of 1,019 Android build failures, and GradleFixer, an LLM agent that leverages domain-specific tools to bridge the reasoning-execution gap, achieving an 81.4% build repair rate by replacing general-purpose shell commands with specialized, API-like abstractions.
Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer
The Big Problem: The "Broken App" Dilemma
Imagine you are building a massive, complex Lego castle (an Android app). You have a master builder (the LLM, or Large Language Model) who knows the theory of architecture perfectly. They know exactly what a castle should look like.
However, when you ask the master builder to fix a broken wall, they often fail. Why? Because while they know what needs to be fixed, they are terrible at using the specific tools in your workshop. They might try to use a hammer to tighten a screw, or they might forget to turn on the power to the saw.
In the real world, Android apps frequently break during the "building" phase (compiling). Developers spend a huge amount of time fixing these errors. The researchers wanted to see if AI could fix these broken builds automatically.
The Solution: Two Big Contributions
The paper introduces two main things to solve this problem:
1. A New "Training Ground" (AndroidBuildBench)
To teach the AI how to fix broken apps, the researchers needed a practice field. They created AndroidBuildBench.
- The Analogy: Imagine a driving school. Instead of just showing students a picture of a car, they give them a real car with the engine broken in 1,000 different ways.
- What they did: They collected 1,019 real-world examples of Android apps that broke. Crucially, they didn't just show the broken part; they also showed the "answer key"—the exact fix that a human developer made later to get the app working again. This ensures the AI is learning from problems that can actually be solved.
2. The New Mechanic: GradleFixer
They built a new AI agent called GradleFixer.
- The Old Way (The Generalist): Previous AI agents were given a "General Toolbox." This toolbox had a generic hammer, a generic screwdriver, and a generic wrench. To fix a specific problem, the AI had to figure out which tool to pick, how to hold it, and exactly how hard to hit. This was too much thinking for the AI, and they often dropped the tools or hit the wrong thing.
- The New Way (The Specialist): GradleFixer was given a Specialized Toolkit. Instead of a generic hammer, it has a button labeled "Run Build." Instead of a generic screwdriver, it has a button labeled "Change Java Version."
- The Analogy: Think of it like ordering food.
- Old Way: You have to tell the chef, "Go to the fridge, find the milk, pour it into a glass, find a spoon, and stir." If you miss a step, the drink is ruined.
- New Way (Tool Bridging): You just say, "Make me a latte." The machine (the tool) knows exactly how to do the steps.
The "Aha!" Moment: The Reasoning-Execution Gap
The most important discovery in the paper is what they call the Reasoning-Execution Gap.
- The Finding: The AI actually knew the answer. It knew it needed to change a setting or add a library. But when it tried to do it using the "General Toolbox" (typing out complex computer commands), it messed up the syntax or the order.
- The Metaphor: Imagine a brilliant chef who knows exactly how to bake a soufflé. But if you hand them a screwdriver and tell them to "bake the souffley," they will fail because they don't know how to use the screwdriver as an oven.
- The Fix: By giving the AI a "Bake Soufflé" button (a domain-specific tool) instead of a screwdriver, the AI's brilliant brain could finally do its job.
The Results: Small Tools, Big Wins
The researchers tested their new "Specialist" agent against the old "Generalist" agents.
- The Score: The new agent (GradleFixer) fixed 81.4% of the broken apps on the first try. The old agents only fixed about 65% (and that was with the best models available).
- The Surprise: They found that a smaller, cheaper AI model equipped with these special tools performed better than a massive, expensive AI model that only had the generic tools.
- Analogy: A junior mechanic with a perfect, specialized wrench set can fix a car faster than a genius engineer who has to figure out how to use a random assortment of household tools.
Why This Matters
This paper suggests that to make AI truly useful for complex jobs, we shouldn't just make the AI "smarter." Instead, we should build better tools for the AI to use.
By "bridging the gap" between what the AI knows (high-level reasoning) and what it can actually do (low-level execution), we can make software development faster, cheaper, and less frustrating for everyone. It turns the AI from a confused student into a master craftsman.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.