Browsing by Subject "Modern code review"
Now showing 1 - 7 of 7
Results Per Page
Sort Options
Item Open Access Analyzing the impact of process smells in code review(Bilkent University, 2022-07) Pirouzkhah, ShirinCode review is a valuable modern software development practice for identifying potential problems in changesets and improving source code quality in software projects. Developers adhere to specific rules and best practices in an ideal code review process. Deviations from these best practices can potentially lead to unintended consequences. These deviations, also known as code review process smells, affect different parts of the code review process and its outcomes. This research empirically analyzes the correlations between process smells, and the impact of code review process smells (shared knowledge, reopened issues, time to complete review (TTCR), abandoned pull requests (PRs), number or review comments, and contribution of large changeset reviewers). The relationship between smells and their impact is correlation-based, but a causal relationship is not guaranteed because proving such relationships is not straightforward. To quantitatively analyze the impact of smells in the code review process, we investigated 244,903 PRs from four open source software (OSS) projects from Gerrit (Qt, Eclipse, Wireshark, and LibreOffice). As a result, we discovered that the existence of a committers’ side smell in a pull request (PR) could lead to the occurrence of reviewers’ side smells in the same PR. We also observed that reviewers assigned repeatedly by the same author to review the PR have a heavier review workload. Furthermore, the ping pong reviews and large changesets are most likely to increase the bug reopen ratio. In addition, we noticed that the time to complete review of a smelly PR is likely to be more than time to complete review of non-smelly PR. Also, the existence of process smells in a PR effect the number of review comments in that pull request.Item Open Access Detection and elimination of systematic labeling bias in code reviewer recommendation systems(Association for Computing Machinery, 2021-06-21) Tecimer, K. Ayberk; Tüzün, Eray; Dibeklioğlu, Hamdi; Erdoğmuş, HakanReviewer selection in modern code review is crucial for effective code reviews. Several techniques exist for recommending reviewers appropriate for a given pull request (PR). Most code reviewer recommendation techniques in the literature build and evaluate their models based on datasets collected from real projects using open-source or industrial practices. The techniques invariably presume that these datasets reliably represent the “ground truth.” In the context of a classification problem, ground truth refers to the objectively correct labels of a class used to build models from a dataset or evaluate a model’s performance. In a project dataset used to build a code reviewer recommendation system, the recommended code reviewer picked for a PR is usually assumed to be the best code reviewer for that PR. However, in practice, the recommended code reviewer may not be the best possible code reviewer, or even a qualified one. Recent code reviewer recommendation studies suggest that the datasets used tend to suffer from systematic labeling bias, making the ground truth unreliable. Therefore, models and recommendation systems built on such datasets may perform poorly in real practice. In this study, we introduce a novel approach to automatically detect and eliminate systematic labeling bias in code reviewer recommendation systems. The bias that we remove results from selecting reviewers that do not ensure a permanently successful fix for a bug-related PR. To demonstrate the effectiveness of our approach, we evaluated it on two open-source project datasets —HIVE and QT Creator— and with five code reviewer recommendation techniques —Profile-Based, RSTrace, Naive Bayes, k-NN, and Decision Tree. Our debiasing approach appears promising since it improved the Mean Reciprocal Rank (MRR) of the evaluated techniques up to 26% in the datasets used.Item Open Access A review of code reviewer recommendation studies: Challenges and future directions(Elsevier, 2021-04-14) Çetin, H. Alperen; Doğan, Emre; Tüzün, ErayCode review is the process of inspecting code changes by a developer who is not involved in the development of the changeset. One of the initial and important steps of code review process is selecting code reviewer(s) for a given code change. To maximize the benefits of the code review process, the appropriate selection of the reviewer is essential. Code reviewer recommendation has been an active research area over the last few years, and many recommendation models have been proposed in the literature. In this study, we conduct a systematic literature review by inspecting 29 primary studies published from 2009 to 2020. Based on the outcomes of our review: (1) most preferred approaches are heuristic approaches closely followed by machine learning approaches, (2) the majority of the studies use open source projects to evaluate their models, (3) the majority of the studies prefer incremental training set validation techniques, (4) most studies suffer from reproducibility problems, (5) model generalizability and dataset integrity are the most common validity threats for the models and (6) refining models and conducting additional experiments are the most common future work discussions in the studies.Item Open Access Reviewer recommendation using software artifact traceability graphs(Association for Computing Machinery, 2019) Sülün, Emre; Tüzün, Eray; Doğrusöz, UğurVarious types of artifacts (requirements, source code, test cases, documents, etc.) are produced throughout the lifecycle of a software. These artifacts are often related with each other via traceability links that are stored in modern application lifecycle management repositories. Throughout the lifecycle of a software, various types of changes can arise in any one of these artifacts. It is important to review such changes to minimize their potential negative impacts. To maximize benefits of the review process, the reviewer(s) should be chosen appropriately. In this study, we reformulate the reviewer suggestion problem using software artifact traceability graphs. We introduce a novel approach, named RSTrace, to automatically recommend reviewers that are best suited based on their familiarity with a given artifact. The proposed approach, in theory, could be applied to all types of artifacts. For the purpose of this study, we focused on the source code artifact and conducted an experiment on finding the appropriate code reviewer(s). We initially tested RSTrace on an open source project and achieved top-3 recall of 0.85 with an MRR (mean reciprocal ranking) of 0.73. In a further empirical evaluation of 37 open source projects, we confirmed that the proposed reviewer recommendation approach yields promising top-k and MRR scores on the average compared to the existing reviewer recommendation approaches.Item Open Access RSTrace+: Reviewer suggestion using software artifact traceability graphs(Elsevier BV, 2021-02) Sülün, Emre; Tüzün, Eray; Doğrusöz, UğurContext: Various types of artifacts (requirements, source code, test cases, documents, etc.) are produced throughout the lifecycle of a software. These artifacts are connected with each other via traceability links that are stored in modern application lifecycle management repositories. Throughout the lifecycle of a software, various types of changes can arise in any one of these artifacts. It is important to review such changes to minimize their potential negative impacts. To make sure the review is conducted properly, the reviewer(s) should be chosen appropriately. Objective: We previously introduced a novel approach, named RSTrace, to automatically recommend reviewers that are best suited based on their familiarity with a given artifact. In this study, we introduce an advanced version of RSTrace, named RSTrace+ that accounts for recency information of traceability links including practical tool support for GitHub. Methods: In this study, we conducted a series of experiments on finding the appropriate code reviewer(s) using RSTrace+ and provided a comparison with the other code reviewer recommendation approaches. Results: We had initially tested RSTrace+ on an open source project (Qt 3D Studio) and achieved a top-3 accuracy of 0.89 with an MRR (mean reciprocal ranking) of 0.81. In a further empirical evaluation of 40 open source projects, we compared RSTrace+ with Naive-Bayes, RevFinder and Profile based approach, and observed higher accuracies on the average. Conclusion: We confirmed that the proposed reviewer recommendation approach yields promising top-k and MRR scores on the average compared to the existing reviewer recommendation approaches. Unlike other code reviewer recommendation approaches, RSTrace+ is not limited to recommending reviewers for source code artifacts and can potentially be used for recommending reviewers for other types of artifacts. Our approach can also visualize the affected artifacts and help the developer to make assessments of the potential impacts of change to the reviewed artifact.Item Open Access Towards a taxonomy of code review smells(Elsevier, 2021-10-10) Doğan, Emre; Tüzün, ErayContext: Code review is a crucial step of the software development life cycle in order to detect possible problems in source code before merging the changeset to the codebase. Although there is no consensus on a formally defined life cycle of the code review process, many companies and open source software (OSS) communities converge on common rules and best practices. In spite of minor differences in different platforms, the primary purpose of all these rules and practices leads to a faster and more effective code review process. Non-conformance of developers to this process does not only reduce the advantages of the code review but can also introduce waste in later stages of the software development. Objectives: The aim of this study is to provide an empirical understanding of the bad practices followed in the code review process, that are code review (CR) smells. Methods: We first conduct a multivocal literature review in order to gather code review bad practices discussed in white and gray literature. Then, we conduct a targeted survey with 32 experienced software practitioners and perform follow-up interviews in order to get their expert opinion. Based on this process, a taxonomy of code review smells is introduced. To quantitatively demonstrate the existence of these smells, we analyze 226,292 code reviews collected from eight OSS projects. Results: We observe that a considerable number of code review smells exist in all projects with varying degrees of ratios. The empirical results illustrate that 72.2% of the code reviews among eight projects are affected by at least one code review smell. Conclusion: The empirical analysis shows that the OSS projects are substantially affected by the code review smells. The provided taxonomy could provide a foundation for best practices and tool support to detect and avoid code review smells in practice. © 2021Item Open Access Towards a taxonomy of code review smells(Bilkent University, 2020-09) Doğan, EmreCode review is a crucial step of the software development life cycle in order to detect possible problems in source code before merging the changeset to the codebase. Although there is no consensus on a formally defined life cycle of the code review process, many companies and open source software (OSS) communities converge on common rules and best practices. In spite of minor differences in different platforms, the primary purpose of all these rules and practices is to lead a faster and more effective code review process. Non-conformance of developers to this process does not only hinder the advantages of the code review but can also negatively affect the other steps of the software development life cycle. The aim of this study is to provide an empirical understanding of the bad practices followed in the code review process, that are code review (CR) smells. To this end, we first conduct a multivocal literature review in order to gather code review bad practices discussed in white and gray literature. Then, we conduct a survey with 32 experienced software practitioners and perform follow-up interviews in order to get their expert opinion. Based on the multivocal literature review and expert opinion of experienced developers, a taxonomy of code review smells (lack of code review, review buddies, reviewer-author ping pong, looks good to me (LGTM) reviews, sleeping reviews, missing context in reviews and large changesets) is introduced. To quantitatively demonstrate the existence of these smells, we analyze 283,354 code reviews collected from eight OSS projects. We observe that a considerable number of code review smells exist in all projects with varying degree of ratios.