A comparison between text-based and graphics-based methods in object oriented code comprehension

Code comprehension is one of the most central activities in software development. Moreover, comprehending code takes up a lot of time. Code comprehension can be split in two main approaches: (1) text- based (e.g. using an IDE) and (2) graphics-based (e.g. using a 3D representation). The aim of this study is to shed more light on the effectiveness of these two approaches in the context of object-oriented programs.

The first step was to select a tool for each approach and therefore a rigorous review of academic and grey literature was conducted to classify existing tools and select one for each approach through specific selection criteria (e.g. citation in literature and support). For the graphics-based approach CodeMetropolis was selected, while the IntelliJ IDE was opted for the text-based approach. CodeMetropolis is a tool that represents OO code using a city metaphor, mapping code
structures and code metrics onto a three-dimensional city structure.

A between-subject study design was adopted where participants were randomly assigned to either the text-based approach (using IntelliJ) or the graphics-based approach (using CodeMetropolis). Both approaches included the same object-oriented codebase, and participants in either group were required to answer a series of questions to understand their level of code comprehension (e.g. functionality, coupling, cohesion etc…). While carrying out the code-comprehension tasks a number of data points were also recorded, including the time taken to complete tasks, accuracy of task completion, the participant’s thought process (using concurrent think aloud) along with the overall perceptions of the tool.

At the time of writing, the data shows that no one method is consistently and significantly better than the other. With CodeMetropolis, participants manage to better comprehend and highlight system metrics like coupling levels, while with IntelliJ, participants manage to obtain a better understanding of system dependencies and logic within the code.

Figure 1. The CodeMetropolis tool
Figure 2. The IntelliJ tool

Student: Kristina Pace
Course: B.Sc. IT (Hons.) Software Development
Supervisor: Dr Chris Porter
Co-supervisor: Dr Mark Micallef