Spotting the difference: A source code comparison tool

Marconi Lanna, Université D'Ottawa / University Of Ottawa, Université D'Ottawa / University Of Ottawa
Source Code Management (SCM) is a valuable tool in most software development projects, whichever their size. SCM provides the ability to store, retrieve, and restore previous versions of files. File comparison tools complement SCM systems by offering the capability to compare files and versions, highlighting their differences. Most file comparison tools are built around a two-pane interface, with files displayed side by side. Such interfaces may be inefficient in their use of screen
more » ... ing horizontal real estate---and ineffective, for duplicating text makes it difficult to read, while placing most of the comparison burden on the user. In this work, we introduce an innovative metaphor for file comparison interfaces. Based on a single-pane interface, common text is displayed only once, with differences intelligently merged into a single text stream, making reading and comparing more natural and intuitive. To further improve usability, additional features were developed: difference classification---additions, deletions, and modifications ---using finer levels of granularity than is usually found in typical tools; a set of special artifacts to compare modifications ; and intelligent white space handling. A formal usability study conducted among sixteen participants using real-world code samples demonstrated the interface adequacy. Participants were, on average, 60% faster performing source code comparison tasks, while answer quality improved, on our weighted scale, by almost 80%. According to preference questionnaires, the proposed tool conquered unanimous participant preference.
doi:10.20381/ruor-12440 fatcat:xfx2icrc6rcohm3zyc6e7x4iwa