Error-Tolerant Code Segmentation for Supporting Semantic Conflict Prevention in Real-Time Collaborative Programming

Jinfeng Jiang, Qirui Fu, Mingjie Wang, Zhonghao Liu, Junxiao Lyu, Hongfei Fan · 2024

Real-time collaborative programming is a novel approach that enables programmers to simultaneously edit shared source code at the same time, which has been applied in a variety of software development scenarios. To achieve semantic conflict prevention in real-time collaboration, a dependency-based automatic locking (DAL) approach was proposed in prior work, which prevents programmers' concurrent editing on selected source code regions. However, DAL's reliance on source code analysis techniques may lead to failures when there exists syntax errors in the source code. To overcome such limitation, we propose an error-tolerant code segmentation (ECS) approach, as well as supporting algorithms, to improve semantic conflict prevention. Technically, the ECS approach continuously identifies source code regions and maintains their range information to ensure stable source code segmentation and code region tracking during the collaboration process, without the need to deal with complex syntax issues. The proposed approach and algorithms have been implemented in a prototype, and experimental evaluations have demonstrated their effectiveness and efficiency.

Read the paper · More papers on PaperTik