Semantic conflict detection via dynamic analysis - Moraes, Amanda; Borba, Paulo; Silva, Léuson Da (Anais do Simpósio Brasileiro de Linguagens de Programação (SBLP); 2024: Anais do XXVIII Simpósio Brasileiro de Linguagens de Programação, 2024)
During collaborative software development, a semantic conflict may occur when the individual behavior expected by different developers is no longer preserved after merging their branches. While potential semantic conflicts are not captured via textual merge tools, different approaches have already been proposed based on static analysis or automated test generation to verify behavioral changes given a merge scenario. However, these approaches share some limitations regarding scalability and reporting false positives and negatives. Trying to address these limitations, in this work, we assess the detection of conflicts by focusing on overriding assignments in JavaScript code through dynamic analysis. Dynamic analysis allows us to detect changes involving writing operations to the same state element at runtime and does not need assertions about the under-analysis code, such as in test-based approaches, requiring only the final version of the merged code (post-merge) to be executed. To evaluate our approach, besides translating test cases from related works, we empirically analyze merge scenarios from 50 JavaScript opensource projects hosted on GitHub, from which we correctly detected one scenario of overriding assignment representing a potential semantic conflict with no false positives.