Readability of Method Chains : A Controlled Experiment with Eye Tracking Approach

Detta är en Master-uppsats från Blekinge Tekniska Högskola/Institutionen för programvaruteknik

Sammanfattning: Context. Source codes with lower level of readability impose a higher cost to software maintainability. Research also exposed the importance of readability as a vital factor on software maintainability. Therefore, readability has recently investigated by software engineers. Readability involves human’s interactions making the study on readability difficult. In this study, we explore the readability of method chain and non-method chain in Java source codes with the means of an eye tracking device as a newly-introduced approach. Objectives. Objectives of this study are: 1. we investigated if the number of methods in a method chain affects the readability of Java source codes, and 2. we investigated the readability of two programming styles: method chain and non-method chain. Methods. To achieve both objectives of this study, two controlled experiments were conducted inside a laboratory with the means of an eye tracker device. In the first experiment, treatment groups were exposed separately to method chains with different number of methods. In the second experiment, the treatment groups were exposed separately to two different programming styles: method chain and non-method chain. Results. Participants of this study were students with the average age of 24.56 years old. Fixation durations of participants’ reading was measured in millisecond (ms). In the first experiment, the average of fixation durations per method with lower number of methods was 600.93 ms, and with higher number of methods was 411.53 ms. In the second experiment, the average of fixation durations per method for non-method chain style was 357.94 ms, and for method chain style was 411.53 ms. Conclusions. In the first experiment, the analysis of fixation durations indicates that method chains with higher number of methods are slightly more readable. Analysis of t-test (t − value = −0.5121, significance level = 0.05, and two-tailed prob-ability) confirms that the results of the first experiment does not show a significant difference at p < 0.05. The results of the second experiment show that non-method chain style is slightly more readable in comparison with method chain style. Analysis of t-test (t − value = 3.1675, significance level = 0.05, and two-tailed probability) confirms that the results of the second experiment show a significant difference at p < 0.05.

  HÄR KAN DU HÄMTA UPPSATSEN I FULLTEXT. (följ länken till nästa sida)