Tech Blog

Technology

Smarter Coding Technology

By Abdul Mueez4 min read
← Back to blog

Gmail’s smart compose feature is a fascinating implementation example of making technology smarter. It’s real time accuracy is helping a lot of Gmail users, especially in the corporate world, in making Email communication more efficient. Similar features have been implemented in many products, like WhatsApp offering predictive text messages, or Google Search autocompleting your query, but these are straightforward prediction methods and not as advanced as Gmail’s smart compose. Let’s think of a scenario to do the same with code bug fixes what Gmail does with mail composition.

For all product based companies, bug fixing is expensive. Increase in bugs increases the usage of resources to fix it. Every bug goes through many phases like bug reproduction, bug localization, bug fixing, bug validation and many more. The idea here is to be able to auto-compose a bug fix by just reproducing the issue locally using the knowledge your text editors already have of your code like your methods, variables, classes, interfaces along with all their references, and the past bug fixes history.

Smart compose for Bug Fixes

This concept is not something new out of the box in the Tech world. Intelligent code completion has been in the market for more than 20 years now. Many tech giants have been doing extensive research in making coding smarter through their products. IntelliSense, which is Microsoft’s implementation of code completion for Visual Studio, is one such example. Introduction of a smart compose feature for bug fixes will definitely make a huge impact in software development.

A tech giant has already implemented this feature internally, and has also been using it for fixing bugs automatically in production for more than 2 years now. It has built a tool that can find bug fixes automatically, and offers them for approval from the engineers. It is the Getafix tool by Facebook.


Getafix by Facebook – A Perfect Example

With modern codebases being extremely complex and requiring to be updated constantly, Facebook built a tool called Getafix which automatically finds bug fixes and offers them to engineers to approve. The uniqueness of this Getafix tool is that when deployed at production scale, it can contribute to the stability and performance of Facebook apps that billions of people use.

Getafix works in conjunction with two other Facebook tools, Infer and Sapienz. Infer is a static analysis tool that identifies issues such as null pointer exceptions. Sapeinz is an intelligently automated testing system for Facebook apps. Using this technology we can address code issues from any source.

The goal of Getafix, as described by Facebook, is to let computers take care of the routine work, albeit under the watchful eye of a human, who must decide when a bug requires a complex, non routine remediation. The tool works by applying a new method of hierarchical clustering to many thousands of past code changes made by engineers, analyzing the change and also the context around the code change. Using this method Getafix detects the underlying patterns in bugs, and the corresponding fixes unlike any other previous auto-fix tools. You can find the detailed working of Getafix here.

Getafix is part of our overall effort to build intelligent tools that rely on statistical analysis of large code corpora and the associated metadata. Such tools have the potential to improve all aspects of the software development life cycle, including code discovery, code quality, and operational efficiency. The insights we gain from Getafix will help us in building out and deploying additional tools in this space.

FACEBOOK

With the advancement of technology, we need to adapt new methods to improve the efficiency of work and optimize the outcome of software development. I believe that the addition of smart compose features for bug fixes in the development life cycle will help in achieving those goals.

Keep reading

You may be interested in

Browse all articles →
Using SCEP Certificates with Okta and SureMDM for Zero Trust Security
August 5, 20257 min read

Using SCEP Certificates with Okta and SureMDM for Zero Trust Security

For businesses embracing zero-trust principles, secure certificate-based authentication isn’t just nice to have—it’s a necessity. With Okta as your Identity Provider (IdP) and SureMDM as your unified endpoint management solution, you can now seamlessly distribute and manage device certificates using Simple Certificate Enrollment Protocol (SCEP). This blog will guide you through: Why Use SCEP with […]

By Sunny KumarRead More →
How to Use mc CLI for Bucket Management and Credential Setup
June 12, 20252 min read

How to Use mc CLI for Bucket Management and Credential Setup

MinIO client The MinIO Client, commonly known as mc, is a command-line tool used to interact with MinIO, a high-performance object storage system. The mc client allows users to manage buckets and objects on the MinIO storage service.

By Malkeet SinghRead More →
How to Setup Passwordless SSH Login for ADE
March 18, 20253 min read

How to Setup Passwordless SSH Login for ADE

To set up a passwordless SSH login in Linux all you need to do is to generate a public authentication key and append it to the remote hosts ~/.ssh/authorized_keys file. The following steps will describe the process for configuring passwordless SSH login: 1. Check for existing SSH key pair Before generating a new SSH key […]

By Mohan Kumar KMRead More →