Towards Measuring & Improving Source Code Quality

Sammanfattning: Context: Software quality has a multi-faceted description encompassing sev-eral quality attributes. Central to our efforts to enhance software quality is toimprove the quality of the source code. Poor source code quality impacts thequality of the delivered product. Empirical studies have investigated how toimprove source code quality and how to quantify the source code improvement.However, little is known about how internal code structure information canbe consistently linked with quality attributes observed by users. Furthermore,there is little research to improve source code quality by understanding trendsin feedback from code review comments.Objective: This thesis aims to explore methods to improve source codequality during the development and synthesize metrics to measure improvementin source code quality. Hence, our objectives are 1) To synthesize evidence oflinks between source code metrics and external quality attributes, & identifysource code metrics, 2) To investigate potential improvements to state-of-the-artapproach to analyze the themes in code review comments, and 3) To understandreviewer feedback from abandoned and accepted code changes.Method: We conducted a tertiary study to achieve the first objective andarchival analysis to study the latter two objectives.Results: To quantify source code quality improvement, we reported a com-prehensive catalog of source code metrics and a small set of source code met-rics consistently linked with maintainability, reliability, and security. To im-prove source code quality using analysis of code review comments, our exploredmethodology improves the state-of-the-art with interesting results.Conclusions: The thesis provides a promising way to analyze themes incode review comments. Researchers can use the source code metrics providedto estimate these quality attributes reliably. In future work, we aim to derive asoftware improvement checklist based on the analysis of trends in code reviewcomments.   

  KLICKA HÄR FÖR ATT SE AVHANDLINGEN I FULLTEXT. (PDF-format)