The Role of Duplicated Code in Software Readability and Comprehension
2020 (English)Independent thesis Advanced level (degree of Master (Two Years)), 20 credits / 30 HE credits
Student thesis
Abstract [en]
Background. Readability and comprehension are the critical points of software developmentand maintenance. There are many researcher point out that the duplicatecode as a code smell has effect on software maintainability, but lack of research abouthow duplicate code affect software readability and comprehension, which are parts of maintainability.
Objectives. In this thesis, we aim to briefly summarize the impact of duplicatecode and typical types of duplicate code according to current works, then our goalis to explore whether duplicate code is a factor to influence readability and comprehension.
Methods. In our present research, we did a background survey to asked some background questions from forty-two subjects to help us classify them, and conduct an experiment with subjects to explore the role of duplicate code on perceived readability and comprehension by experiment. The perceived readability and comprehension are measured by perceived readability scale, reading time and the accuracy of cloze test.
Results. The experimental data shows code with duplication have higher perceived readability and better comprehension, however, the difference are not significant.And code with duplication cost less reading time than code without duplication,and the difference is significant. But duplication type are strongly associate with perceived readability. For reading time, it is significant associate with duplication type and size of code. While there do not exists significant correlation between programmingexperience of subjects and perceived readability or comprehension, andit also has no significant relation between perceived readability and comprehension,size and CC according to our data results.
Conclusions. Code with duplication has higher software readability according tothe results of reading time, which is significant. And code with duplication has highercomprehension than code without duplication, but the difference is not statistically significant according to our experimental results. Longer size of code will increasereading time, and different duplication type also influence the perceived readability,the three duplication types we discussed show these relationship obviously.
Place, publisher, year, edition, pages
2020.
Keywords [en]
Duplicate code, Software readability, Comprehension, Experiment, Survey
National Category
Software Engineering
Identifiers
URN: urn:nbn:se:bth-20621OAI: oai:DiVA.org:bth-20621DiVA, id: diva2:1485316
Subject / course
PA2534 Master's Thesis (120 credits) in Software Engineering
Educational program
PAADA Master Qualification Plan in Software Engineering 120,0 hp
Presentation
2020-09-23, 10:00 (English)
Supervisors
Examiners
2020-11-052020-11-022020-11-05Bibliographically approved