
A global study has revealed that AI-generated code is being widely used on GitHub, especially among Indian developers. According to the study, AI tools wrote 21.6% of Python functions from Indian contributors in 2024.
The results were produced in collaboration with the HUN-REN Center in Hungary, Corvinus University of Budapest, the Complexity Science Hub (Vienna), and the University of Utrecht.
An AI-written code detection neural classifier was used to analyze data from 80 million GitHub commits made by 200,000 developers over six years. Additionally, the study describes the increasing economic impact of AI and its expanding role in programming.
GitHub Users Are Writing Code With AI
The study examined Python functions from various countries, identifying how often developers used AI tools. As of December 2024, 30.1% of Python functions from the US were AI-generated. With 24.3%, Germany came in second, followed by France (23.2%), India (21.6%), Russia (15.4%), and China (11.7%).
Interestingly, compared to seasoned developers, new GitHub users were more likely to use AI tools. Furthermore, the study claims that a developer’s commit frequency can rise by 2.4% each quarter by incorporating AI into their workflow by just 30%. This implies that AI is increasing coding productivity in addition to replacing labor.
How Was AI-Generated Code Tracked?
The group developed a precise model to identify AI-generated code in millions of GitHub posts. The collection of human-written Python functions began in 2018. Additionally, the team combined two large language models to produce examples of synthetic code. One of those two models described the human code, while the other produced AI code that matched the human code.
These examples were processed using GraphCodeBERT, a specialized model that tokenizes and embeds code for better learning. The classifier was then fine-tuned and tested, achieving an ROC AUC score of 0.964. Thus, this high score indicates a high level of accuracy in identifying AI-generated functions.
Since Python is one of the most widely used languages on GitHub, it was the primary focus of the study. The analysis of Python functions across different geographies revealed how fast AI is becoming a key part of software engineering. Furthermore, the study linked the use of AI tools to developer behavior to determine the frequency, timing, and reasons for GitHub users’ AI tool preferences.
Is AI Becoming a Real Threat to Coders?
The study combined US wage statistics with occupation-level data to determine AI’s economic worth beyond code detection. The annual contribution of AI-generated code to the U.S. software industry is estimated to be between $9.6 billion and $14.4 billion. This massive profit demonstrates AI’s increasing impact on actual results.
Experts predict that this trend will pick up speed. AI will become more prevalent in programming as more developers, particularly those who are new to GitHub, embrace automation. Additionally, analysts point out that AI-powered productivity tools may soon influence hiring practices, project delivery, and product speed.
As AI becomes more prevalent in the future, moral principles and methods for confirming the source of code may be required. As a result, developers who use AI to create Python functions might also have trouble maintaining or debugging partly written code.
Final Verdict
According to the findings, AI-generated code represents a paradigm shift in software development. In India, AI is having an impact, as it writes one out of every five Python functions. Therefore, in this rapidly evolving field, developers, teams, and businesses must now adjust to strike a balance between speed, quality, and oversight. Additionally, maintaining human oversight at a level that matches machine-generated efficiency is a challenge.