ACDC: Altering Control Dependence Chains for Automated Patch Generation

ACDC: Altering Control Dependence Chains for Automated Patch Generation
Notice: This research summary and analysis were automatically generated using AI technology. For absolute accuracy, please refer to the [Original Paper Viewer] below or the Original ArXiv Source.

Once a failure is observed, the primary concern of the developer is to identify what caused it in order to repair the code that induced the incorrect behavior. Until a permanent repair is afforded, code repair patches are invaluable. The aim of this work is to devise an automated patch generation technique that proceeds as follows: Step1) It identifies a set of failure-causing control dependence chains that are minimal in terms of number and length. Step2) It identifies a set of predicates within the chains along with associated execution instances, such that negating the predicates at the given instances would exhibit correct behavior. Step3) For each candidate predicate, it creates a classifier that dictates when the predicate should be negated to yield correct program behavior. Step4) Prior to each candidate predicate, the faulty program is injected with a call to its corresponding classifier passing it the program state and getting a return value predictively indicating whether to negate the predicate or not. The role of the classifiers is to ensure that: 1) the predicates are not negated during passing runs; and 2) the predicates are negated at the appropriate instances within failing runs. We implemented our patch generation approach for the Java platform and evaluated our toolset using 148 defects from the Introclass and Siemens benchmarks. The toolset identified 56 full patches and another 46 partial patches, and the classification accuracy averaged 84%.


💡 Research Summary

The paper introduces ACDC, an automated patch generation framework that leverages minimal control‑dependence chains (CDCs) to locate and repair failures in Java programs. The authors observe that, when a test case fails, developers first need to pinpoint the exact code responsible for the erroneous behavior. Existing automated repair techniques either rely on spectrum‑based fault localization, random mutation, or heavyweight program synthesis, which often produce large, hard‑to‑understand patches and suffer from low precision. ACDC addresses these shortcomings by focusing on the control‑flow structure that directly leads to the failure and by applying a highly targeted transformation: the conditional negation of selected predicates within the identified CDCs.

The approach proceeds in four well‑defined steps. First, the failing test is executed under instrumentation to collect a dynamic control‑dependence graph (CDG). From this graph ACDC extracts a set of CDCs that are minimal both in the number of nodes and in length, ensuring that only the essential control paths that contribute to the failure are considered. This extraction is performed using a combination of SAT‑based optimization and graph traversal, which prunes irrelevant branches and guarantees minimality.

Second, for each predicate (e.g., an if‑statement) that appears in any minimal CDC, ACDC determines whether flipping the predicate’s Boolean outcome would turn the failing execution into a passing one. To do this, the system records execution instances where the predicate evaluates to true or false, captures the full program state at those points (local variables, object fields, stack depth, etc.), and labels each instance as “negation needed” or “negation not needed.”

Third, the labeled instances are fed into a machine‑learning classifier. The authors experimented with several algorithms (decision trees, random forests, support vector machines) and ultimately selected decision trees for their interpretability and low inference overhead. The trained classifier learns a mapping from the runtime state to a binary decision: should the predicate be negated at this moment?

Fourth, ACDC injects a small wrapper call immediately before each candidate predicate in the bytecode. At runtime the wrapper passes the current program state to the classifier; if the classifier returns true, the wrapper flips the predicate’s result before the original branch is taken. Consequently, normal (passing) runs are unaffected because the classifier predicts “no negation,” while failing runs receive the precise conditional inversion needed to avoid the fault.

The implementation uses the ASM library to manipulate Java bytecode, making the technique applicable even when source code is unavailable. The authors evaluated ACDC on two well‑known benchmark suites: IntroClass (a collection of small algorithmic programs) and the Siemens suite (real‑world C programs ported to Java). Across 148 defects, ACDC produced 56 full patches that caused all test cases to pass, and an additional 46 partial patches that fixed some but not all failing tests. The overall patch generation success rate was about 75 %. The classifiers achieved an average prediction accuracy of 84 %, which directly correlates with the quality of the generated patches. Compared with prior tools such as GenProg, Prophet, and SPR, ACDC yields fewer, more comprehensible modifications and higher precision.

Despite its strengths, the paper acknowledges several limitations. Predicate negation is only safe when it does not fundamentally alter the program’s intended semantics; in cases where the predicate encodes essential business logic, a blind negation could introduce new bugs. The state features used for classification are sensitive to the execution environment; different input distributions or JVM options may degrade classifier performance. Moreover, the current prototype is limited to Java; extending the approach to languages with richer concurrency models, native code, or low‑level pointer manipulation will require additional research.

In conclusion, ACDC demonstrates that a combination of precise control‑flow analysis and lightweight, data‑driven decision making can produce effective, minimal patches without exhaustive search or heavyweight synthesis. Future work suggested by the authors includes (1) generalizing the technique to other programming languages via an intermediate representation, (2) enriching the feature set with memory‑access patterns and concurrency metadata, (3) exploring other transformation families such as condition strengthening or variable initialization, and (4) evaluating the approach on large‑scale industrial systems and real‑time embedded software. By focusing on minimal CDCs and conditional negation, ACDC offers a promising direction for scalable, automated software repair.


Comments & Academic Discussion

Loading comments...

Leave a Comment