mlsanityData to 14 Oct 2026

DocPrism: Multi-lingual Detection of Incorrectness Inconsistencies between Code and Documentation

arXiv 2511.00215 ↗First posted 31 Oct 2025cs.SEcited by 3

Not on the map. Why?

Abstract (arXiv)

Code-documentation inconsistencies are common and undesirable: they can lead to developer misunderstandings and software defects. This paper introduces DocPrism, a lightweight multi-language, code-documentation inconsistency detection tool. DocPrism uses a standard large language model (LLM) to analyze and explain inconsistencies, and focuses on outputting incorrectness inconsistencies. Plain use of LLMs for this task yields unacceptably high inconsistency flag rates-i.e., over 90% of functions are flagged as inconsistent with their documentation. One substantial reason is that LLMs identify natural gaps between high-level documentation and code as incompleteness inconsistencies. We introduce and apply the Local Categorization, External Filtering (LCEF) methodology: LCEF uses an LLM's local completion skills, rather than its long-term reasoning skills, to focus on reporting incorrectness inconsistencies. In our ablation study, LCEF reduces DocPrism's inconsistency flag rate from 98% to 14%, and increases F1 score from 0.22 to 0.77, compared to standard prompting techniques. On a broad evaluation across Python, TypeScript, C++, and Java, DocPrism maintains a low flag rate of 17%, and achieves a precision of 0.63 without performing any fine-tuning. We also establish a conservative lower bound across four programming languages, showing that inconsistency errors are present in 11% of code-documentation pairs. In addition, DocPrism achieves precision comparable to the state-of-the-art on an established synthetic dataset, but substantially outperforms it on our real-world Java dataset in precision (DocPrism: 0.47-0.67 vs. SOTA: 0.05-0.14).

Key facts. Cited by 3 papers in the map (data through 14 Oct 2026). First posted on arXiv 31 Oct 2025.

Builds on

No reference list yet.

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2026: 3.

3 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2025METAMON: Finding Inconsistencies between Program Documentation and Behavior using Metamorphic LLM Queries
  2. 2023Invalidator: Automated Patch Correctness Assessment via Semantic and Syntactic Reasoning
  3. 2023DocChecker: Bootstrapping Code Large Language Model for Detecting and Resolving Code-Comment Inconsistencies
  4. 2025CodeFuse-CommitEval: Towards Benchmarking LLM's Power on Commit Message and Code Change Inconsistency Detection
  5. 2026Inferring Code Correctness from Specification
  6. 2025CodeMirage: A Multi-Lingual Benchmark for Detecting AI-Generated and Paraphrased Source Code from Production-Level LLMs
  7. 2026Beyond Strict Rules: Assessing the Effectiveness of Large Language Models for Code Smell Detection ↗
  8. 2026Code-QA-Bench: Separating Code Reasoning from Documentation Memorization in Repository-Level QA