Automated Code Review Using Large Language Models at Ericsson: An Experience Report

Shweta Ramesh, Joy Bose, Hamender Singh, Ak Raghavan, Sujoy Roy Chowdhury, Giriprasad Sridhara, Nishrith Saini, Ricardo Britto · 2025

Read Automated Code Review Using Large Language Models at Ericsson: An Experience Report by Shweta Ramesh, Joy Bose, Hamender Singh, Ak Raghavan, Sujoy Roy Chowdhury, Giriprasad Sridhara, Nishrith Saini, Ricardo Britto (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2507-19115.txt.

Introduction

Code review guards software quality, but senior staff rarely have time for deep reads of every change. Shweta Ramesh and co-authors report how one phone giant tried language models for that chore, in work from twenty twenty-five. Their tool pairs the model with classic static checks, kept light on purpose.

Seasoned developers then test-drove the tool on real code. Early results cheered the team: the bot caught points worth a human's eye and eased the load. The report walks through build choices, snags, and what the trials taught. It stands as a field note for other big shops weighing the same move, with limits plainly stated.

Catalog record

CREATORShweta Ramesh, Joy Bose, Hamender Singh, Ak Raghavan, Sujoy Roy Chowdhury, Giriprasad Sridhara, Nishrith Saini, Ricardo Britto
YEAR2025
COLLECTIONPAPERS
FORMATTXT
FILE SIZE24 KB
VERSION1.0
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2507-19115

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

Automated Code Review Using Large Language Models at Ericsson: An Experience Report Shweta Ramesh, Joy Bose, Hamender Singh, Ak Raghavan, Sujoy Roy Chowdhury, Giriprasad Sridhara, Nishrith Saini, Ricardo Britto Abstract Code review is one of the primary means of assuring the quality of released software along with testing and static analysis. However, code review requires experienced developers who may not always have the time to perform an in-depth review of code. Thus, automating code review can help alleviate the cognitive burden on experienced software developers allowing them to focus on their primary activities of writing code to add new features and fix bugs. In this paper, we describe our experience in using Large Language Models towards automating the code review process in Ericsson. We describe the development of a lightweight tool using LLMs and static program analysis. We then describe our preliminary experiments with experienced developers in evaluating our code review tool and the encouraging results. I Introduction There are multiple orthogonal and mutually complementary techniques to ensure the quality of the software. Typically, these methods include software testing that dynamically executes the software under test to detect bugs; static program analysis that analyzes code without running it to discover problems such as a potential division by zero; and code reviews which involve experienced developers reading the code to find issues in the software. Code reviews are critical to ensuring the quality and maintainability of software systems. They serve as a vital mechanism for detecting bugs, improving code design, and facilitating knowledge sharing among team members. Despite their importance, code reviews can be challenging due to the programming expertise, domain knowledge, and most importantly, time required from the developers who are chosen to review the code. These reviews often impose a significant cognitive load on developers and are highly relying on the availability of senior developers, making them a bottleneck in the development life cycle. Moreover, the time spent reviewing code reduces the time senior developers can dedicate to their primary responsibilities, namely, developing new features and fixing bugs. Generative AI and in particular Large Language Models have become very popular towards automating numerous tasks in software engineering ranging from writing of code to testing it. In this paper, we explore Large Language Models towards automatically generating code reviews for our code in Ericsson. In particular, we rely on a relatively light weight approach that avoided expensive pre-training and instruction fine tuning for generating code reviews. We experimented with various prompts to obtain a concise yet precise code review. We discovered that adding contextual information to the LLM’s input prompt helped the LLM generate better reviews. Our input consists of Java code lines that have been modified (to fix a bug or add a new feature). Our solution then utilizes static program analysis to extract the enclosing method of the modified lines, thus ensuring that proper context is passed to the LLM. Our aim is to provide developers timely and consistent feedback as they commit their code to version control systems such as Gerrit and Git. Thus, we integrate our automated code review into the workflow to ensure early detection of issues. Our solution aims to reduce the cognitive burden that code review imposes on experienced software developers and thus allowing them to focus on their typical primary responsibilities of writing code to add new features and/or fix bugs. A simple but naive approach to automating the code review generation is to prompt the LLM with a text message such as “Please generate a code review for the following code”. In reality, we observed that such simple prompts do not work well in practice. Thus, generating meaningful reviews requires careful consideration of the following factors: • What data to prompt on? The data, the code diff in our case, must be passed to LLM with the right context. The context is defined as the code changeset and the reference method or the function on which the changes were made. The context in our solution is termed as the enclosing method. • How to prompt? We experimented with multiple prompting styles within the constraint window size of LLMs. The prompting styles ensure that the reviews are short, crisp, and human-like (typically LLMs generate verbose reviews); that the reviews are related to the enclosing method (LLMs hallucinate and generate random function names, objects, etc.); and, that no code is generated in the output (LLMs do this by default). • How to validate prompt results? Engineering various prompting styles was not sufficient enough to generate good reviews. We further developed a validation mechanism to fine-tune the reviews generated, including summarizing and Ranking reviews, storing reviews generated by LLMs and validating them through human experts, and re-calibrating prompts using expert feedback. We also considered the following practical aspects when developing our approach: • It generates relevant, concise, and accurate reviews, ensuring consistency with code changes while minimizing mistakes. • It is fast, cost-efficient, and easy to integrate with existing development workflows while maintaining security, logging feedback for continuous improvement, and incorporating human validation where necessary. This paper presents the approach and preliminary results of an evaluation (survey-based), offering insights into its practical application and potential improvements. We show that our approach can significantly enhance the quality of code reviews, helping to alleviate the cognitive load on human reviewers and streamlining the development process. The remainder of the paper is organized as follows: Section II outlines literature related to our work. Section III describes the design used in our research. Section IV lists the prompts we used. Section V outlines our approach. Section VI shows the preliminary results of evaluating our approach. Section VII synthesizes the analyze of our preliminary results. Finally, in Section VIII , we conclude the paper and discuss a research roadmap for our work in this area. II Related Work Automated code review has been a key focus in software engineering, aiming to improve software quality while reducing the manual effort of reviewing code. Traditional approaches rely on manual reviews and static analysis tools such as SonarQube and Fortify, which are often time-consuming, prone to error and limited in scope to certain types of fixes and improvements [ 2 ] . With the advent of Large Language Models (LLMs), researchers have explored code review methods based on them. Studies have shown the feasibility of using LLMs for code review tasks. Recent work has also highlighted the benefits of LLM-based tools in detecting bugs, identifying code smells, and optimizing software development workflows [ 5 ] . Another study [ 7 ] explored the use of Github Copilot and ChatGPT for AI suggestions, but found that real-world adoption remains limited due to concerns regarding accuracy, computational cost, and scalability. In the paper by Fang et al. [ 3 ] , models are trained on large code repositories and review data, enabling them to provide context-aware suggestions that improve code quality beyond static analysis tools. A study [ 8 ] explores how fine-tuned LLMs can generate more readable and understandable review comments, and studies the potential of LLMs to assist human reviewers by providing relevant explanations for detected issues. A literature review [ 9 ] examines the use of LLMs in program repair, which

Read the complete text