CopyLeaks is a popular tool for spotting AI-written content. But how does it handle code? Let’s explore.

With large language models spreading widely in education, teachers need to adjust by using AI detection tools. But, most AI detectors focus on text. We know assignments come in different forms.
Take coding, for example.
No worries—CopyLeaks offers a solution for teachers with CodeLeaks. But, how precise is it? This article will explore that, explain how to use CodeLeaks, and share my thoughts on it. Keep reading!
What is CopyLeaks?
CopyLeaks is designed to curb AI misuse and plagiarism. It’s a set of tools that uses cutting-edge algorithms to analyze text, documents, and even code.

Stick to their motto of “Empowering Originality and Inspiring Authenticity,” CopyLeaks stands out with its plagiarism checker and AI content detector. When we tested their AI content detector with our data, it showed a 75% accuracy rate in true positives, outperforming tools like Content at Scale and Originality. In false positives, it scored 80%, the second highest among eight detectors.
What is CodeLeaks?
CodeLeaks is a tool in CopyLeaks that finds copied code, whether it’s from existing libraries or a language model. Each code entry produces a detailed report showing duplicated sections, their sources, and the percentage of plagiarism. We’ll explore this further soon.

How To Detect AI Code Using CodeLeaks?
Step #1: Create An Account
To begin spotting code with CodeLeaks, first set up an account. Go to their dashboard and click the “Login” or “Create Account” button located in the top-left corner of the screen.

Step #2: Upload Your Code
You should now see their dashboard completely. To check, look for six options in the middle of your screen. Next, choose the “Code” option.

After you enter, just drag a code file onto the dashboard. Now, just finish the final step.
Step #3: Get A Detailed Report
Before we go on, I’m going to make a Python script with ChatGPT and save it as a .py file. I asked ChatGPT to write code for Fizzbuzz, which is a well-known Leetcode challenge.
Here’s the task: You need to print numbers from 1 to 100. If a number is a multiple of 3, print “FIZZ”; if it’s a multiple of 5, print “BUZZ.” For numbers that are multiples of both 3 and 5, print “FIZZBUZZ.”
This is the solution ChatGPT provided me with:

Let’s keep that as a .py file and then put it on CodeLeaks. Here’s what it shows:

AI code analysis is different from checking for code plagiarism. It mainly tells you one thing about the input: how likely it is that AI created it, shown as a percentage.
How Accurate is CodeLeaks?
Now that you understand CodeLeaks, let’s check its accuracy in spotting AI code. The test has two parts: true positive and false positive. The first part is for AI code, and the second checks if CodeLeaks can spot human code. So, let’s get started…
True Positive Tests















False Positive Tests






Tallied Score and Thoughts on CodeLeaks’ Accuracy

I was surprised by how precise CodeLeaks turned out to be. It got the sample data right as AI or human 7 out of 8 times, which is impressive. Even with one mistake, it still did well. The tool was very sure of its results, giving scores of either 0% or 100% AI likelihood, and mostly, it was correct.
Another thing that stands out is that CopyLeaks seems to spot AI in code better than in regular text. I think comments have a big role in this. Both the AI-made codes and the mistaken test had lots of comments and notes.
The Bottom Line
In today’s world, AI detection faces a lot of scrutiny, but CopyLeaks doesn’t fall short. We know it’s skilled at spotting AI-generated text, but who would have guessed it excels at detecting AI code too?
It’s promising to see AI detection improving, whether for text or code. OpenAI got criticized for claiming detection isn’t reliable, even though they were correct. Yet, AI detection tools are advancing alongside large language models, and CopyLeaks might be leading this change.
Curious about CopyLeaks? Check out more in our articles like this one. Best of luck!