Repository Analysis

ocornut/imgui

Dear ImGui: Bloat-free Graphical User interface for C++ with minimal dependencies

4.5 Likely human-written View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of ocornut/imgui, a C++ project with 74,606 GitHub stars. SynthScan v2.0 examined 120,110 lines of code across 150 source files, recording 575 pattern matches distributed across 10 syntactic categories. The overall adjusted score of 4.5 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).

4.5
Adjusted Score
4.5
Raw Score
100%
Time Factor
2026-07-10
Last Push
74.6K
Stars
C++
Language
120.1K
Lines of Code
150
Files
575
Pattern Hits
2026-07-14
Scan Date
0.01
HC Hit Rate

What These Metrics Mean

Adjusted Score
Primary synthetic code indicator. Raw score normalised per 1,000 lines of code and multiplied by the temporal discount factor. This is the definitive comparative metric — use it to rank repositories by AI authorship density.
Raw Score
The unmodified sum of all severity-weighted, context-multiplied pattern match scores before temporal discounting. Reflects the absolute signal strength independent of when the repository was last active.
Time Factor
The temporal discount multiplier (0–100%) applied to the raw score. Repositories last updated before ChatGPT's launch (Nov 2022) receive a 5% factor. Full signal is only assigned to repositories active in the post-adoption era (Jan 2024+).
Pattern Hits
Total count of individual pattern matches across all files and categories. A high hit count with a low score may indicate a very large codebase with isolated AI snippets; a low count with a high score indicates dense, concentrated AI signatures.
HC Hit Rate
High+Critical pattern hits per file, averaged across the repository. This orthogonal signal catches repositories where a few files are densely packed with high-severity AI tells — a strong indicator even when the normalised score appears moderate due to codebase size.
Lines of Code / Files
Total lines and files analysed. The scanner examines 94 file extensions. These denominators are used to normalise the score, enabling fair comparison between repositories of vastly different sizes.

Score History

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.

Severity Breakdown

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.

CRITICAL 0HIGH 1MEDIUM 4LOW 570

Directory Score Breakdown

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.

Pattern Findings

The scanner identified 575 distinct pattern matches across 10 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.

Over-Commented Block553 hits · 502 pts
SeverityFileLineSnippetContext
LOWimgui.h1// dear imgui, v1.92.9 WIPCOMMENT
LOWimgui.h21// - Issues & support ........... https://github.com/ocornut/imgui/issuesCOMMENT
LOWimgui.h41// [SECTION] Forward declarations and basic typesCOMMENT
LOWimgui.h61#pragma onceCOMMENT
LOWimgui.h81COMMENT
LOWimgui.h101#define IM_STRINGIFY(_EXPR) IM_STRINGIFY_HELPER(_EXPR) // Preprocessor idiom to stringify e.g. COMMENT
LOWimgui.h121COMMENT
LOWimgui.h141#pragma clang diagnostic ignored "-Wunknown-pragmas" // warning: unknown warning group 'xxx'COMMENT
LOWimgui.h321//-----------------------------------------------------------------------------COMMENT
LOWimgui.h341#endifCOMMENT
LOWimgui.h421 IMGUI_API void StyleColorsDark(ImGuiStyle* dst = NULL); // new, recommended style (default)COMMENT
LOWimgui.h441 // - Use child windows to begin into a self-contained independent scrolling/clipping regions within a host window. CCOMMENT
LOWimgui.h501 IMGUI_API float GetScrollMaxY(); // get maximum scrolling amoCOMMENT
LOWimgui.h661 // - The old Combo() api are helpers over BeginCombo()/EndCombo() which are kept available for convenience purpose. COMMENT
LOWimgui.h821 // TooltipsCOMMENT
LOWimgui.h841 // - Their visibility state (~bool) is held internally instead of being held by the programmer as we are used to wiCOMMENT
LOWimgui.h861 IMGUI_API void OpenPopupOnItemClick(const char* str_id = NULL, ImGuiPopupFlags popup_flags = 0); // helpeCOMMENT
LOWimgui.h881 IMGUI_API bool IsPopupOpen(const char* str_id, ImGuiPopupFlags flags = 0); // returCOMMENT
LOWimgui.h901 // - TableNextColumn() -> Text("Hello 0") -> TableNextColumn() -> Text("Hello 1")COMMENT
LOWimgui.h1061 // - the ImGuiKey enum contains all possible keyboard, mouse and gamepad inputs (e.g. ImGuiKey_A, ImGuiKey_MouseLeftCOMMENT
LOWimgui.h1081 // Child1 -> call Shortcut(Ctrl+S) // When Child1 is focused, Child1 gets the shortcut (Child1 overrides PCOMMENT
LOWimgui.h1201COMMENT
LOWimgui.h1661 // but may be accessed via standard key API such as IsKeyPressed(), IsKeyReleased(), querying duration etc.COMMENT
LOWimgui.h2021// - Default to ImGuiTableFlags_SizingStretchSame if ScrollX is off.COMMENT
LOWimgui.h2181// Debug Logging into ShowDebugLogWindow(), tty and more.COMMENT
LOWimgui.h2201#define IM_PLACEMENT_NEW(_PTR) new(ImNewWrapper(), _PTR)COMMENT
LOWimgui.h2381 IMGUI_API void ScaleAllSizes(float scale_factor); // Scale all spacing/padding/thickness values. Do not scale fontCOMMENT
LOWimgui.h2481 // You not are not supposed to rely on it in the course of a normal application run.COMMENT
LOWimgui.h2501 // Tools to detect code submitting items with conflicting/duplicate IDsCOMMENT
LOWimgui.h2621 // This is still temporarily supported as a legacy feature. However the new preferred scheme is for backend to call COMMENT
LOWimgui.h2641COMMENT
LOWimgui.h2721 bool IsPreview() const { return Preview; }COMMENT
LOWimgui.h2801 ImGuiStoragePair(ImGuiID _key, void* _val) { key = _key; val_p = _val; }COMMENT
LOWimgui.h2861// fetching/submitting your own data incurs additional cost. Coarse clipping using ImGuiListClipper allows you to easilCOMMENT
LOWimgui.h2901COMMENT
LOWimgui.h2961// - User can declare their own format by #defining the 5 _SHIFT/_MASK macros in their imconfig file.COMMENT
LOWimgui.h3001 static ImColor HSV(float h, float s, float v, float a = 1.0f) { float r, g, b; ImGui::ColorConvertHSVtoRGB(h, s, vCOMMENT
LOWimgui.h3021// Usage:COMMENT
LOWimgui.h3101struct ImGuiSelectionRequestCOMMENT
LOWimgui.h3161//-----------------------------------------------------------------------------COMMENT
LOWimgui.h3181// A) Change your GPU render state,COMMENT
LOWimgui.h3401 IMGUI_API void PathRect(const ImVec2& rect_min, const ImVec2& rect_max, float rounding = 0.0f, ImDrawFlags flags = COMMENT
LOWimgui.h3681 ImFontAtlasFlags_NoPowerOfTwoHeight = 1 << 0, // Don't round the height to next power of twoCOMMENT
LOWimgui.h3721 // Clearing the atlas/fonts has little use nowadays, unless you want to batch remove all fonts. COMMENT
LOWimgui.h3761 IMGUI_API const ImWchar* GetGlyphRangesChineseFull(); // Default + Half-Width + Japanese Hiragana/KataCOMMENT
LOWimgui.h3781 // - Read docs/FONTS.md for more details about using colorful icons.COMMENT
LOWimgui.h4061 // Written by some backends during ImGui_ImplXXXX_RenderDrawData() call to point backend_specific ImGui_ImplXXXX_RenCOMMENT
LOWimgui.h4121 IMGUI_API ImVec2 GetWindowContentRegionMin(); // Content boundaries min for the windowCOMMENT
LOWimgui.h4141 //static inline void CaptureKeyboardFromApp(bool want_capture_keyboard = true) { SetNextFrameWantCOMMENT
LOWimgui.h4161 //static inline bool DragFloat(const char* label, float* v, float v_speed, float v_min, float v_max, const char* foCOMMENT
LOWimgui.h4181 //static inline bool IsRootWindowFocused() { return IsWindowFocused(ImGuiFocusedFlags_RootWindow); COMMENT
LOWimgui.h4221//-- OBSOLETED in 1.82 (from Mars 2021): flags for AddRect(), AddRectFilled(), AddImageRounded(), PathRect()COMMENT
LOWimgui.h4241//typedef ImGuiKeyChord ImGuiKeyModFlags; // == intCOMMENT
LOWimgui.h4261#endifCOMMENT
LOWimstb_textedit.h1// [DEAR IMGUI]COMMENT
LOWimstb_textedit.h21// It is intended for use in games and other systems that need to buildCOMMENT
LOWimstb_textedit.h41// VERSION HISTORYCOMMENT
LOWimstb_textedit.h61// 0.1 (2010-07-08) initial versionCOMMENT
LOWimstb_textedit.h81//COMMENT
LOWimstb_textedit.h101// moderate sizes. The undo system does no memory allocations, soCOMMENT
493 more matches not shown…
Fake / Example Data8 hits · 10 pts
SeverityFileLineSnippetContext
LOWimgui_demo.cpp7670 ImGui::TextWrapped("Lorem ipsum dolor sit amet");CODE
LOWimgui_demo.cpp7670 ImGui::TextWrapped("Lorem ipsum dolor sit amet");CODE
LOWimgui_demo.cpp7672 ImGui::Text("Lorem ipsum dolor sit amet");CODE
LOWimgui_demo.cpp7672 ImGui::Text("Lorem ipsum dolor sit amet");CODE
LOWimgui_demo.cpp9572 ImGui::TextWrapped("Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor iCODE
LOWimgui_demo.cpp9572 ImGui::TextWrapped("Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor iCODE
LOWimgui_demo.cpp10533 ImGui::TextWrapped("Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt utCODE
LOWimgui_demo.cpp10533 ImGui::TextWrapped("Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt utCODE
AI Response Leakage1 hit · 8 pts
SeverityFileLineSnippetContext
HIGHexamples/example_glfw_wgpu/CMakeLists.txt190# In this example IMGUI_IMPL_WEBGPU_BACKEND_DAWN / IMGUI_IMPL_WEBGPU_BACKEND_WGPU internal define is set according to:COMMENT
AI Slop Vocabulary2 hits · 6 pts
SeverityFileLineSnippetContext
MEDIUMimgui.cpp6779 // FIXME: Essentially we want to restrict manual resizing to WindowMinSize+Decoration, and allow api resizing to be COMMENT
MEDIUMimgui.cpp9156// FIXME-NEWATLAS-V2: perhaps we can now leverage ImFontAtlasUpdateDrawListsTextures() ?COMMENT
Structural Annotation Overuse3 hits · 4 pts
SeverityFileLineSnippetContext
LOWimgui.cpp3424 // Step 0: Let you process the first element (regardless of it being visible or not, so we can measure the element hCOMMENT
LOWimgui.cpp3441 // Step 1: Let the clipper infer height from first rangeCOMMENT
LOW.github/workflows/build.yml703 # WARNING: This will need updating if toolset/sdk change in project files!COMMENT
Slop Phrases2 hits · 4 pts
SeverityFileLineSnippetContext
MEDIUMimgui_widgets.cpp7349// Tip: pass a non-visible label (e.g. "##hello") then you can use the space to draw other text or image.COMMENT
LOWimgui.cpp1025 - 2017/08/25 (1.52) - io.MousePos needs to be set to ImVec2(-FLT_MAX,-FLT_MAX) when mouse is unavailable/missing. PreviCODE
Verbosity Indicators2 hits · 3 pts
SeverityFileLineSnippetContext
LOWimgui.cpp3424 // Step 0: Let you process the first element (regardless of it being visible or not, so we can measure the element hCOMMENT
LOWimgui.cpp3441 // Step 1: Let the clipper infer height from first rangeCOMMENT
Self-Referential Comments1 hit · 3 pts
SeverityFileLineSnippetContext
MEDIUMmisc/debuggers/imgui_lldb.py1# This file implements synthetic children providers and summaries for various Dear ImGui types for LLDB.COMMENT
Hyper-Verbose Identifiers2 hits · 2 pts
SeverityFileLineSnippetContext
LOWbackends/imgui_impl_win32.cpp968// Borrowed from GLFW's function updateFramebufferTransparency() in src/win32_window.cCOMMENT
LOWdocs/CHANGELOG.txt6824- Misc: Added obsolete redirection function GetItemsLineHeightWithSpacing() (which redirects to GetFrameHeightWithSpacinCODE
Example Usage Blocks1 hit · 2 pts
SeverityFileLineSnippetContext
LOWmisc/fonts/binary_to_compressed_c.cpp20// Usage example:COMMENT