# ControlFlag: A Self-Supervised Idiosyncratic Pattern Detection System for Software Control Structures

arXiv: https://arxiv.org/abs/2011.03616 · HTML: https://mlsanity.com/paper/2011.03616/

## Key facts

- Cited by 5 papers in the map (data through 14 Oct 2026).
- First posted on arXiv 6 Nov 2020.

## Built on by (most cited first, 5 of 5)

- [Advising OpenMP Parallelization via a Graph-Based Approach with Transformers](https://mlsanity.com/paper/2305.11999/) (2023)
- [MPI-rical: Data-Driven MPI Distributed Parallelism Assistance with Transformers](https://mlsanity.com/paper/2305.09438/) (2023)
- [GitRank: A Framework to Rank GitHub Repositories](https://mlsanity.com/paper/2205.02360/) (2022)
- [Are Machine Programming Systems using Right Source-Code Measures to Select Code Repositories?](https://mlsanity.com/paper/2209.11946/) (2022)
- [Report of the Workshop on Program Synthesis for Scientific Computing](https://mlsanity.com/paper/2102.01687/) (2021)

## Abstract (arXiv)

Software debugging has been shown to utilize upwards of half of developers' time. Yet, machine programming (MP), the field concerned with the automation of software (and hardware) development, has recently made strides in both research and production-quality automated debugging systems. In this paper we present ControlFlag, a self-supervised MP system that aims to improve debugging by attempting to detect idiosyncratic pattern violations in software control structures. ControlFlag also suggests possible corrections in the event an anomalous pattern is detected. We present ControlFlag's design and provide an experimental evaluation and analysis of its efficacy in identifying potential programming errors in production-quality software. As a first concrete evidence towards improving software quality, ControlFlag has already found an anomaly in CURL that has been acknowledged and fixed by its developers. We also discuss future extensions of ControlFlag.
