AI Code Detector Runs in your browser

AI CODE DETECTOR GUIDE

Why does the flagged line count differ from the matched rule count?

The counts measure different things. A matched rule is a code-style pattern that appears at least once in the submitted code. A flagged line is a line where at least one rule matched. One rule can flag several lines, and several rules can flag the same line.

Is My Code AI analyzes submitted code locally in your browser.

One rule can flag more than one line

This example places the same kind of defensive error text on two separate lines:

throw new Error("Input is required");
validateInput();
throw new Error("Value is invalid");

Run against the current Is My Code AI heuristic, it matches one configured rule, Template-style defensive error text, and flags two lines. The rule appears once in the matched-rule list with both line numbers. The intervening line does not match that rule.

One line can match more than one rule

The following single comment matches both an explicit AI-tool attribution pattern and a boilerplate comment phrasing pattern:

// Note: generated by AI

The current heuristic reports two matched rules but one flagged line. The line is highlighted once, even though both rule entries point to it. This example shows how the counters are related; the comment alone cannot establish who wrote the code.

How to read the score alongside these counts

The score adds the configured weight for each rule that matched at least once. Repeating the same matching pattern on another line can increase the flagged-line count without adding that rule's weight again. A single line that matches several different rules can contribute each of their weights. The score is a heuristic summary of matched patterns, not a percentage of AI-written lines or proof of authorship.

In the examples above, the repeated error-text pattern has a matched weight of 6, while the single comment matches rule weights of 34 and 13, totaling 47. These are the current rule weights in this site's detector, not measurements of origin. Both examples were run against the current detector code before publication.

Use the report to inspect code

Open each matched rule and follow its listed line numbers. Read the surrounding code to see whether the pattern has a straightforward explanation in the project. Compare reports only when you know which code was submitted for each run; adding or removing lines changes the material being checked.

Try the AI code detector with your own snippet. It supports Python, JavaScript, Java, C++, PHP, and C#. Submitted code is not uploaded by this static site. For more about the display, see how to read flagged lines and what the score means.