Tesseract Open Source OCR Engine (main repository)
This report presents the forensic synthetic code analysis of tesseract-ocr/tesseract, a C++ project with 75,323 GitHub stars. SynthScan v2.0 examined 210,673 lines of code across 564 source files, recording 911 pattern matches distributed across 6 syntactic categories. The overall adjusted score of 4.4 places this repository in the Likely human-written band.
The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).
This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.
Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.
This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.
The scanner identified 911 distinct pattern matches across 6 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.
Reading the findings table: The Severity column indicates the diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | autogen.sh | 1 | #!/bin/sh | COMMENT |
| LOW | autogen.sh | 21 | # The whole thing is quite complex... | COMMENT |
| LOW | autogen.sh | 101 | fi | COMMENT |
| LOW | nsis/winpath.cpp | 1 | // Copyright (C) 2024 Stefan Weil | COMMENT |
| LOW | unittest/doubleptr.h | 1 | // Copyright 2012 Google Inc. All Rights Reserved. | COMMENT |
| LOW | unittest/doubleptr.h | 21 | COMMENT | |
| LOW | unittest/include_gunit.h | 1 | // (C) Copyright 2017, Google Inc. | COMMENT |
| LOW | unittest/include_gunit.h | 81 | # define CHECK_GT(test, value) CHECK((test) > (value)) | COMMENT |
| LOW | unittest/lstm_test.h | 1 | // (C) Copyright 2017, Google Inc. | COMMENT |
| LOW | unittest/lstm_test.h | 21 | #include "helpers.h" | COMMENT |
| LOW | unittest/log.h | 1 | /////////////////////////////////////////////////////////////////////// | COMMENT |
| LOW | unittest/capiexample_c_test.c | 1 | /////////////////////////////////////////////////////////////////////// | COMMENT |
| LOW | unittest/cycletimer.h | 1 | // (C) Copyright 2017, Google Inc. | COMMENT |
| LOW | unittest/normstrngs_test.h | 1 | // (C) Copyright 2017, Google Inc. | COMMENT |
| LOW | unittest/util/utf8/unilib.h | 21 | // point to exactly the same memory. | COMMENT |
| LOW | unittest/util/utf8/unicodetext.h | 21 | #include <iterator> // for bidirectional_iterator_tag, etc | COMMENT |
| LOW | unittest/util/utf8/unicodetext.h | 41 | // is changed. | COMMENT |
| LOW | unittest/util/utf8/unicodetext.h | 61 | // UnicodeText tests for interchange-validity, and will substitute a | COMMENT |
| LOW | unittest/util/utf8/unicodetext.h | 81 | // validity check. They are used internally and by friend-functions | COMMENT |
| LOW | unittest/util/utf8/unicodetext.h | 101 | // | COMMENT |
| LOW | unittest/util/utf8/unicodetext.h | 321 | // interchange-valid, a LOG(WARNING) is issued, and each | COMMENT |
| LOW | unittest/util/utf8/unicodetext.h | 401 | // UnicodeTextRange is a pair of iterators, useful for specifying text | COMMENT |
| LOW | unittest/util/utf8/unicodetext.h | 421 | int byte_capacity) { | COMMENT |
| LOW | unittest/util/utf8/unilib_utf8_utils.h | 21 | // They are also exported from unilib.h for legacy reasons. | COMMENT |
| LOW | unittest/third_party/utf/utf.h | 41 | * utf (7) | COMMENT |
| LOW | unittest/third_party/utf/utf.h | 61 | COMMENT | |
| LOW | unittest/third_party/utf/utf.h | 81 | COMMENT | |
| LOW | unittest/third_party/utf/utf.h | 101 | COMMENT | |
| LOW | unittest/third_party/utf/utf.h | 121 | // byte terminating a string is considered to be part of the string s. | COMMENT |
| LOW | unittest/third_party/utf/utf.h | 161 | COMMENT | |
| LOW | unittest/fuzzers/oss-fuzz-build.sh | 1 | #!/bin/bash -eu | COMMENT |
| LOW | unittest/fuzzers/fuzzer-api.cpp | 1 | #include <allheaders.h> | COMMENT |
| LOW | unittest/syntaxnet/base.h | 21 | #include <string> | COMMENT |
| LOW | include/tesseract/ltrresultiterator.h | 1 | // SPDX-License-Identifier: Apache-2.0 | COMMENT |
| LOW | include/tesseract/ltrresultiterator.h | 21 | #include "export.h" // for TESS_API | COMMENT |
| LOW | include/tesseract/ltrresultiterator.h | 41 | // See tesseract/publictypes.h for the definition of PageIteratorLevel. | COMMENT |
| LOW | include/tesseract/ltrresultiterator.h | 81 | // object at the given level. Use delete [] to free after use. | COMMENT |
| LOW | include/tesseract/ltrresultiterator.h | 181 | public: | COMMENT |
| LOW | include/tesseract/ltrresultiterator.h | 201 | // data. If only LSTM traineddata is used the value range is 0.0f - 1.0f. All | COMMENT |
| LOW | include/tesseract/pageiterator.h | 1 | // SPDX-License-Identifier: Apache-2.0 | COMMENT |
| LOW | include/tesseract/pageiterator.h | 161 | * equal to other: 0 | COMMENT |
| LOW | include/tesseract/export.h | 1 | // SPDX-License-Identifier: Apache-2.0 | COMMENT |
| LOW | include/tesseract/export.h | 21 | # if defined(TESS_EXPORTS) | COMMENT |
| LOW | include/tesseract/osdetect.h | 1 | // SPDX-License-Identifier: Apache-2.0 | COMMENT |
| LOW | include/tesseract/renderer.h | 1 | // SPDX-License-Identifier: Apache-2.0 | COMMENT |
| LOW | include/tesseract/publictypes.h | 1 | // SPDX-License-Identifier: Apache-2.0 | COMMENT |
| LOW | include/tesseract/unichar.h | 1 | // SPDX-License-Identifier: Apache-2.0 | COMMENT |
| LOW | include/tesseract/unichar.h | 81 | const char *utf8() const { | COMMENT |
| LOW | include/tesseract/unichar.h | 101 | // char buf[5]; | COMMENT |
| LOW | include/tesseract/resultiterator.h | 1 | // SPDX-License-Identifier: Apache-2.0 | COMMENT |
| LOW | include/tesseract/baseapi.h | 1 | // SPDX-License-Identifier: Apache-2.0 | COMMENT |
| LOW | include/tesseract/capi.h | 1 | // SPDX-License-Identifier: Apache-2.0 | COMMENT |
| LOW | include/tesseract/capi.h | 21 | #ifdef __cplusplus | COMMENT |
| LOW | java/com/google/scrollview/ScrollView.java | 141 | // true or false -> Boolean. | COMMENT |
| LOW | .github/workflows/codeql-analysis.yml | 1 | # For most projects, this workflow file will not need changing; you simply need | COMMENT |
| LOW | doc/generate_manpages.sh | 1 | #!/bin/bash | COMMENT |
| LOW | src/svpaint.cpp | 1 | // Copyright 2007 Google Inc. All Rights Reserved. | COMMENT |
| LOW | src/svpaint.cpp | 21 | // - A LMB dragging either draws a line, a rectangle or ellipse. | COMMENT |
| LOW | src/svpaint.cpp | 221 | COMMENT | |
| LOW | src/tesseract.cpp | 21 | # include "config_auto.h" | COMMENT |
| 832 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | src/textord/tablerecog.cpp | 629 | // NOTE: This function assumes the lists are sorted! | COMMENT |
| LOW | src/ccmain/resultiterator.cpp | 144 | // Step 1: Scan for and mark European Number sequences | COMMENT |
| LOW | src/ccmain/resultiterator.cpp | 184 | // Step 2: Convert all remaining types to either L or R. | COMMENT |
| LOW⚡ | src/arch/intsimdmatrix.h | 43 | // Step 1: 8x4=32 results are computed, | COMMENT |
| LOW⚡ | src/arch/intsimdmatrix.h | 44 | // Step 2: 8x4=32 again, total 64, | COMMENT |
| LOW⚡ | src/arch/intsimdmatrix.h | 45 | // Step 3: 2x4=8 (since 8x4 is too many, so is 4x4), total 72, | COMMENT |
| LOW⚡ | src/arch/intsimdmatrix.h | 46 | // Step 4: 1x3, total 75. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | src/wordrec/lm_pain_points.cpp | 3 | // Description: Functions that utilize the knowledge about the properties | COMMENT |
| MEDIUM | src/wordrec/language_model.h | 3 | // Description: Functions that utilize the knowledge about the properties, | COMMENT |
| MEDIUM | src/wordrec/language_model.cpp | 3 | // Description: Functions that utilize the knowledge about the properties, | COMMENT |
| MEDIUM | src/wordrec/lm_pain_points.h | 3 | // Description: Functions that utilize the knowledge about the properties | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | src/ccmain/resultiterator.cpp | 144 | // Step 1: Scan for and mark European Number sequences | COMMENT |
| LOW | src/ccmain/resultiterator.cpp | 184 | // Step 2: Convert all remaining types to either L or R. | COMMENT |
| LOW⚡ | src/arch/intsimdmatrix.h | 43 | // Step 1: 8x4=32 results are computed, | COMMENT |
| LOW⚡ | src/arch/intsimdmatrix.h | 44 | // Step 2: 8x4=32 again, total 64, | COMMENT |
| LOW⚡ | src/arch/intsimdmatrix.h | 45 | // Step 3: 2x4=8 (since 8x4 is too many, so is 4x4), total 72, | COMMENT |
| LOW⚡ | src/arch/intsimdmatrix.h | 46 | // Step 4: 1x3, total 75. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | .github/workflows/autotools-macos.yml | 111 | # ============================================================================================ | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | include/tesseract/ltrresultiterator.h | 72 | // versions, but if new data members are added, don't forget to add them! | COMMENT |