Unsupervised Anomaly Detection for Merge Conflict Resolution

Abstract

This topic investigates unsupervised anomaly detection for merge conflict resolution in software engineering. Existing approaches generally formulate conflict resolution as supervised classification over predefined resolution labels. However, even a large labeled dataset may contain rare, unusual, or incorrectly reconstructed cases, and the labels may not adequately represent the full diversity of merge behavior. This project will develop methods to identify anomalous merge conflicts using the available conflict representations while initially ignoring the nine resolution labels. The objective is to determine whether anomaly scores can identify unusual conflict structures, rare resolution patterns, or cases that are difficult for conventional classifiers.

Supervision

Motivation

Recent work shows that classification-based merge-resolution models perform substantially worse under realistic evaluation protocols than under random chunk-level splits. In the study provided, accuracy decreased from approximately 81% to 59% when all chunks from the same merge were kept in the same partition. Even with a large multi-language dataset and 969 features, the best model reached approximately 75% accuracy in the cross-time setting, indicating that a fixed classification scheme cannot reliably handle every conflict.

The current dataset contains nine resolution labels, but a label is not necessarily sufficient to describe how unusual or complex a conflict is. Two conflicts with the same label may have very different code structures, project contexts, or semantic relationships. Anomaly detection could identify conflicts that differ strongly from the normal patterns in a project, language, or collection of projects, without requiring the labels to be correct.

Goal

The goal is to design and evaluate an unsupervised anomaly-detection pipeline for merge conflicts with nine resolution labels. The student should:

Represent each conflict using available metadata, code features, semantic features, merge context, and information about related conflicts.

Train anomaly-detection models without using the nine resolution labels as training targets.

Compare several approaches, such as Isolation Forest, Local Outlier Factor, one-class classification, clustering-based outlier detection, and autoencoders.

Compare global, language-specific, and project-specific models.

Investigate whether anomalous conflicts are associated with:

Requirements

Pointers

P. Elias, H. D. S. Campos, E. Ogasawara, and L. G. P. Murta, “Towards accurate recommendations of merge conflicts resolution strategies,” Information and Software Technology, vol. 164, Art. no. 107332, 2023.

G. Ghiotto, L. Murta, M. Barros, and A. van der Hoek, “On the nature of merge conflicts: A study of 2,731 open source Java projects hosted by GitHub,” IEEE Transactions on Software Engineering, vol. 46, no. 8, pp. 892–915, 202 formatting and presentation matter.

Contact

Reza.Darooei@unibe.ch