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 75,909 GitHub stars. SynthScan v2.0 examined 122,627 lines of code across 157 source files, recording 589 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-08-28
Last Push
75.9K
Stars
C++
Language
122.6K
Lines of Code
157
Files
589
Pattern Hits
2026-08-29
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 584

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 589 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 Block567 hits · 515 pts
SeverityFileLineSnippetContext
LOWimgui.h1// dear imgui, v1.93.0 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 bool OpenPopup(const char* str_id, ImGuiPopupFlags popup_flags = 0); // call COMMENT
LOWimgui.h881 // - IsPopupOpen() with ImGuiPopupFlags_AnyPopupId: return true if any popup is open at the current BeginPopup() leCOMMENT
LOWimgui.h901 // - TableNextRow() -> TableSetColumnIndex(0) -> Text("Hello 0") -> TableSetColumnIndex(1) -> Text("Hello 1")COMMENT
LOWimgui.h1061 // Inputs Utilities: Raw Keyboard/Mouse/Gamepad AccessCOMMENT
LOWimgui.h1081 // - The general idea is that several callers may register interest in a shortcut, and only one owner gets it.COMMENT
LOWimgui.h1201 ImGuiWindowFlags_Modal = 1 << 27, // Don't use! For internal use by BeginPopupModal()COMMENT
LOWimgui.h1661 ImGuiKey_GamepadRStickDown, // | | | [Analog]COMMENT
LOWimgui.h1821#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONSCOMMENT
LOWimgui.h2041// - Table defaults to ImGuiTableFlags_SizingStretchSame -> all Columns defaults to ImGuiTableColumnFlags_WidthStretcCOMMENT
LOWimgui.h2201COMMENT
LOWimgui.h2401 IMGUI_API void ScaleAllSizes(float scale_factor); // Scale all spacing/padding/thickness values. Do not scale fontCOMMENT
LOWimgui.h2501 // - Error recovery is not perfect nor guaranteed! It is a feature to ease development.COMMENT
LOWimgui.h2521COMMENT
LOWimgui.h2641 // Legacy: before 1.87, we required backend to fill io.KeyMap[] (imgui->native map) during initialization and io.KeyCOMMENT
LOWimgui.h2661#endifCOMMENT
LOWimgui.h2741 bool IsDataType(const char* type) const { return DataFrameCount != -1 && strcmp(type, DataType) == 0; }COMMENT
LOWimgui.h2821 ImGuiStoragePair(ImGuiID _key, float _val) { key = _key; val_f = _val; }COMMENT
LOWimgui.h2881// (Dear ImGui already clip items based on their bounds but: it needs to first layout the item to do so, and generallyCOMMENT
LOWimgui.h2921 IMGUI_API void IncludeItemsByIndex(int item_begin, int item_end); // item_end is exclusive e.g. use (42, 42+1) to COMMENT
LOWimgui.h2981// Helpers macros to generate 32-bit encoded colorsCOMMENT
LOWimgui.h3021 inline void SetHSV(float h, float s, float v, float a = 1.0f){ ImGui::ColorConvertHSVtoRGB(h, s, v, Value.x, ValuCOMMENT
LOWimgui.h3041// - It is used by our demos and provided as a convenience to quickly implement multi-selection.COMMENT
LOWimgui.h3121// Selection request itemCOMMENT
LOWimgui.h3181COMMENT
LOWimgui.h3201// you can poke into the draw list for that! Draw callback may be useful for example to:COMMENT
LOWimgui.h3321// Draw command listCOMMENT
LOWimgui.h3421 IMGUI_API void PathBezierCubicCurveTo(const ImVec2& p2, const ImVec2& p3, const ImVec2& p4, int num_segments = 0); COMMENT
LOWimgui.h3721// - Backend then set ImTextureData's TexID and BackendUserData.COMMENT
LOWimgui.h3761 // - The pitch is always = Width * BytesPerPixels (1 or 4)COMMENT
LOWimgui.h3801 // - You can request arbitrary rectangles to be packed into the atlas, for your own purpose.COMMENT
LOWimgui.h4141 IMGUI_API void Image(ImTextureRef tex_ref, const ImVec2& image_size, const ImVec2& uv0, const ImVec2& uv1, consCOMMENT
LOWimgui.h4161 // OBSOLETED in 1.89.7 (from June 2023)COMMENT
LOWimgui.h4181 //static inline void ListBoxFooter() { EndListBox(); }COMMENT
LOWimgui.h4201 //static inline float GetContentRegionAvailWidth() { return GetContentRegionAvail().x; } COMMENT
LOWimgui.h4221 //-- OBSOLETED in 1.50 and beforeCOMMENT
LOWimgui.h4241 unsigned int GlyphColored:1; // Input // [Internal] For custom font glyphs only: glyph is colored, removed tinCOMMENT
LOWimgui.h4261// ImDrawCornerFlags_Left = ImDrawCornerFlags_TopLeft | ImDrawCornerFlags_BotLeft,COMMENT
LOWimgui.h4281#endifCOMMENT
LOWimgui.h4301#include "imgui_user.h"COMMENT
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
507 more matches not shown…
Fake / Example Data8 hits · 10 pts
SeverityFileLineSnippetContext
LOWimgui_demo.cpp7746 ImGui::TextWrapped("Lorem ipsum dolor sit amet");CODE
LOWimgui_demo.cpp7746 ImGui::TextWrapped("Lorem ipsum dolor sit amet");CODE
LOWimgui_demo.cpp7748 ImGui::Text("Lorem ipsum dolor sit amet");CODE
LOWimgui_demo.cpp7748 ImGui::Text("Lorem ipsum dolor sit amet");CODE
LOWimgui_demo.cpp9649 ImGui::TextWrapped("Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor iCODE
LOWimgui_demo.cpp9649 ImGui::TextWrapped("Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor iCODE
LOWimgui_demo.cpp10612 ImGui::TextWrapped("Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt utCODE
LOWimgui_demo.cpp10612 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.cpp6808 // FIXME: Essentially we want to restrict manual resizing to WindowMinSize+Decoration, and allow api resizing to be COMMENT
MEDIUMimgui.cpp9209// FIXME-NEWATLAS-V2: perhaps we can now leverage ImFontAtlasUpdateDrawListsTextures() ?COMMENT
Structural Annotation Overuse3 hits · 4 pts
SeverityFileLineSnippetContext
LOWimgui.cpp3443 // Step 0: Let you process the first element (regardless of it being visible or not, so we can measure the element hCOMMENT
LOWimgui.cpp3460 // Step 1: Let the clipper infer height from first rangeCOMMENT
LOW.github/workflows/build.yml707 # WARNING: This will need updating if toolset/sdk change in project files!COMMENT
Slop Phrases2 hits · 4 pts
SeverityFileLineSnippetContext
MEDIUMimgui_widgets.cpp7395// Tip: pass a non-visible label (e.g. "##hello") then you can use the space to draw other text or image.COMMENT
LOWimgui.cpp1037 - 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.cpp3443 // Step 0: Let you process the first element (regardless of it being visible or not, so we can measure the element hCOMMENT
LOWimgui.cpp3460 // 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.txt6951- 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