NP_code
The core quantitative metric of the DRA method. It measures the proportion of code units in a patch that keep the task correct after revert testing, and is used to assess whether an agent has written superfluous business logic code.
Timeline (last 90 days)
NP_code (code necessity metric) is defined as the proportion of code units in the patch that still pass the task tests after reverting, out of all code units, with a higher value indicating a larger proportion of necessary code.
On SWE-bench Verified, the agent's mean code necessity NP_code is 0.887, and the developer mean is 0.864.
On DeepSWE, the agent's mean code necessity NP_code is 0.797, and the developer mean is 0.785.
On SWE-bench Verified, on average 11% of code units in agent patches are still unnecessary, of which 89% change behavior.
The study recommends that benchmarks report both code necessity and resolution rate to avoid misleading single metrics.
All Facts (5)
NP_code (code necessity metric) is defined as the proportion of code units in the patch that still pass the task tests after reverting, out of all code units, with a higher value indicating a larger proportion of necessary code.
50%UnverifiedOn SWE-bench Verified, the agent's mean code necessity NP_code is 0.887, and the developer mean is 0.864.
50%UnverifiedOn DeepSWE, the agent's mean code necessity NP_code is 0.797, and the developer mean is 0.785.
50%UnverifiedOn SWE-bench Verified, on average 11% of code units in agent patches are still unnecessary, of which 89% change behavior.
50%UnverifiedThe study recommends that benchmarks report both code necessity and resolution rate to avoid misleading single metrics.
50%