TRANSMISSION // 2611.28159v1

Can AI Write Android Lint Rules From Plain English?

Source published

A benchmark finds that language models can generate many Android Lint checks with execution feedback and documentation, but getting the detection logic right remains difficult.

AI-generated conceptual illustration for Can AI Write Android Lint Rules From Plain English?
AI-generated conceptual illustration; not documentary evidence.

Custom software rules can be easy to describe and difficult to implement. A study tests whether four language models can turn descriptions into Android Lint checks, and how their results change when they receive compiler and test feedback or framework documentation.

A developer might describe a rule in a sentence: flag a fixed seed supplied to SecureRandom, for example. Turning that instruction into an Android Lint check requires more than translating words into code. The check must use the right analysis interface, call framework APIs correctly and identify the pattern that should trigger a warning.

Moshood A. Fakorede and colleagues studied how well large language models (LLMs) handle this task from a rule description, and whether documentation and feedback from running the code help. Their results suggest that models can produce checks that pass benchmark tests, but getting the detection logic right remains difficult.

A benchmark with hidden test code

The researchers created LintBench, a benchmark of 113 real Android Lint checks from the Android Open Source Project. Each check has a developer-facing description and an original test suite. The team reviewed descriptions for clarity and used mutation filtering to check that the tests rejected an empty detector. This does not establish that the tests cover every relevant behavior.

The final benchmark covers source-code checks, XML resources and manifests; 23% of checks require more than one scanner interface. Gradle and other checks were excluded. To count as successful, generated code had to compile against the Lint framework and pass the selected tests.

Four models—two proprietary and two open-weight—were evaluated. In the prompting experiments, each check received five independently sampled attempts at a temperature of 0.8; prompts used descriptions alone, examples or a code skeleton. Separate experiments used a generate-and-repair loop: models received compiler errors or test-failure messages and could revise their code, for up to five calls at temperature 0.2. Some repair conditions also supplied retrieved material from the Lint API reference, developer guide or both. Models did not see test source or the reference implementation, but repair feedback included test outcomes and failure assertions.

Feedback and documentation play different roles

With prompting alone, the best result was a 64.6% pass@5 rate: at least one of five generated attempts passed for that share of benchmark checks. Examples and a code skeleton did not improve results consistently across all four models.

In the repair experiments, the full configuration—repair plus both retrieval sources—passed 85.0% of checks for Gemini within five calls. This is not a direct, controlled comparison with prompting alone: the experiments also differed in temperature and sampling. Within the repair study, settings were held fixed when comparing retrieval conditions.

Without retrieval, repair passed 66.4% for Claude and 80.5% for Gemini. With both sources, those figures were 75.2% and 85.0%, respectively. The authors attribute much of the improvement over prompting to execution feedback, while noting that the comparison includes the change in decoding and sampling.

API documentation mainly helped code compile, with compile rates reaching 99.1% in some configurations. The authors observed larger descriptive gains for lower-performing models, but the measured interaction between model performance and API retrieval was not statistically significant. In their statistical model, retrieval’s effect on passing once code compiled was not significant; that is not proof that retrieval can never help with logic.

The remaining errors point to the harder task. Across models and conditions, 383 of 441 compiled checks that failed tests—about 87%—were classified as false negatives: they missed issues they should have reported. Some reported nothing; others caught only some cases. Compiler feedback can identify an invalid API call. A failing test may show that behavior is wrong without making the correct detection rule obvious.

What the results do—and do not—show

Passing LintBench means passing the selected tests, not working correctly on every possible app. The paper notes that some assertions were relaxed and that tests check only some clean inputs, so broader validation is needed. The 35 checks rejected during human validation were often flagged because their descriptions were underspecified or their tests depended on sibling checks. They passed at a low rate, but the authors caution that this does not rule out solutions with other models or prompts.

The study concerns one framework and four models. The Android source and tests are public, so familiarity from training data cannot be ruled out. The authors report that none of 451 available generated candidates matched the reference after basic normalization or reached 0.95 token-sequence similarity; this does not rule out partial memorization. The study also did not measure whether the approach saves developers time or review effort compared with writing checks themselves.

The paper is an arXiv preprint. Its results are evidence from this particular benchmark and setup, not a general demonstration that LLM-generated checks are ready for deployment. The authors release LintBench and the evaluation harness for further study. For now, the findings distinguish two challenges: execution feedback can help repair framework-level mistakes, while detecting the intended issue remains a persistent obstacle.

Reviewed cross-references

These connections were reviewed by a model, not independently fact-checked by a human. Similarity does not imply agreement; consult the original papers and the evidence below.

  • What counts as success in AI software migration?

    Supporting evidence: Both papers distinguish build or compilation success from stronger correctness evidence: the Android Lint study records compilation and held-out test outcomes separately, while the migration survey cautions that compilation, tests, visual similarity, and runtime behavior measure different properties. This supports the bounded point that build success alone should not stand in for broader validation; the survey reviews migration studies, so it does not independently validate the Lint benchmark’s results.

    Model review: · openai-codex/gpt-6-luna

    Evidence and provenance

    Selected excerpts, not complete papers. PDF extraction can omit figures or damage equations, tables and reading order; sources may be preprints.

    • 2611.28159v1 — Original paper

      Excerpt reference: static/papers/2611.28159v1.md:479-546
      Basis: Paper text
      Source SHA-256: fd9baedcc18c57ff63c57ddb7845fe4dcc783cbbb9ab26893eb9c1a9cd0da758

    • 2611.29942v1 — Original paper

      Excerpt reference: static/papers/2611.29942v1.md:16-67
      Basis: Paper text
      Source SHA-256: b792d40667c352278f326b7304160e183fb68e5a4530ebf15bde0dcd96ff7ede

Automatically matched by shared topic keywords. These links do not imply that the sources agree or establish a consensus.