Detecting Build Conflicts in Software Merge for Java Programs via Static Analysis


연구 분야: Verification



학회: ASE '22: Proceedings of the 37th IEEE/ACM International Conference on Automated Software Engineering


초록

In software merge, the edits from different branches can textually overlap (i.e., textual conflicts) or cause build and test errors (i.e., build and test conflicts), jeopardizing programmer productivity and software quality. Existing tools primarily focus on textual conflicts; few tools detect higher-order conflicts (i.e., build and test conflicts). However, existing detectors of build conflicts are limited. Due to their heavy usage of automatic build, current detectors (e.g., Crystal) only report build errors instead of identifying the root causes; developers have to manually locate conflicting edits. These detectors only help when the branches-to-merge have no textual conflict. We present a new static analysis-based approach Bucond (“build conflict detector”). Given three code versions in a merging scenario: base b, left l, and right r, Bucond models each version as a graph, and compares graphs to extract entity-related edits (e.g., class renaming) in l and r. We believe that build conflicts occur when certain edits are co-applied to related entities between branches. Bucond realizes this insight via pattern matching to identify any cross-branch edit combination that can trigger build conflicts (e.g., one branch adds a reference to field F while the other branch removes F). We systematically explored and devised 57 patterns, covering 97% of the build conflicts in our experiments. Our evaluation shows Bucond to complement build-based detectors, as it (1) detects conflicts with 100% precision and 88%–100% recall, (2) locates conflicting edits, and (3) works well when those detectors do not.


Author Profile
Sheikh Shadab Towqir

Department of Computer Science Virginia Tech USA

United States
Author Profile
Bowen Shen

Department of Computer Science Virginia Tech USA

United States
Author Profile
Muhammad Ali Gulzar

Department of Computer Science Virginia Tech USA

United States

📄 논문 정보

발행 연도 2023년
인용수 2
출판 국가 United States
사이트 ACM
좋아요 수 0

연관 논문 목록 (313건)