Repository Analysis

facebook/folly

An open-source C++ library developed and used at Facebook.

2.9 Likely human-written View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of facebook/folly, a C++ project with 30,461 GitHub stars. SynthScan v2.0 examined 727,879 lines of code across 2536 source files, recording 1861 pattern matches distributed across 18 syntactic categories. The overall adjusted score of 2.9 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).

2.9
Adjusted Score
2.9
Raw Score
100%
Time Factor
2026-07-13
Last Push
30.5K
Stars
C++
Language
727.9K
Lines of Code
2.5K
Files
1.9K
Pattern Hits
2026-07-14
Scan Date
0.02
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 52MEDIUM 22LOW 1787

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 1861 distinct pattern matches across 18 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 Block1627 hits · 1592 pts
SeverityFileLineSnippetContext
LOWCMakeListsForBuck2.txt1# Copyright (c) Meta Platforms, Inc. and affiliates.COMMENT
LOWCMakeLists.txt1# Copyright (c) Meta Platforms, Inc. and affiliates.COMMENT
LOWbuild.sh1#!/bin/bashCOMMENT
LOW.github/scripts/buck_build_and_test.sh1#!/bin/bashCOMMENT
LOWfolly/Demangle.cpp21COMMENT
LOWfolly/Format-inl.h21#include <array>COMMENT
LOWfolly/ConstructorCallbackList.h21#include <memory>COMMENT
LOWfolly/ConstructorCallbackList.h41// ...COMMENT
LOWfolly/ConstructorCallbackList.h61// Per the example above,COMMENT
LOWfolly/ConcurrentSkipList.h121#include <atomic>COMMENT
LOWfolly/ConcurrentSkipList.h621 }COMMENT
LOWfolly/ExceptionWrapper.h21#include <exception>COMMENT
LOWfolly/ExceptionWrapper.h41COMMENT
LOWfolly/ExceptionWrapper.h61//!COMMENT
LOWfolly/ExceptionWrapper.h81//! LOG(ERROR) << "FAILWHALE!";COMMENT
LOWfolly/ExceptionWrapper.h141 //! \post `*this` contains a copy of `that`, and `that` is unmodifiedCOMMENT
LOWfolly/ExceptionWrapper.h201 void reset();COMMENT
LOWfolly/ExceptionWrapper.h261COMMENT
LOWfolly/ExceptionWrapper.h281 //! assert( ew.with_exception([](std::runtime_error& e){/*...*/}) );COMMENT
LOWfolly/ExceptionWrapper.h301 //! `throw e;`.)COMMENT
LOWfolly/ExceptionWrapper.h321 //! [&](std::exception const& e) {COMMENT
LOWfolly/ObserverContainer.h1021COMMENT
LOWfolly/Singleton.cpp21#include <signal.h>COMMENT
LOWfolly/Range.h41#include <folly/lang/Exception.h>COMMENT
LOWfolly/Range.h641 // T constructor that takes a type U that is implicitly convertibleCOMMENT
LOWfolly/Traits.h21#include <functional>COMMENT
LOWfolly/Traits.h101constexpr auto operator""_uzic() noexcept {COMMENT
LOWfolly/Traits.h121/// else static_assert(always_false<T>, "Unsupported type");COMMENT
LOWfolly/Traits.h161} // namespace detailCOMMENT
LOWfolly/Traits.h201/// is_bounded_array_vCOMMENT
LOWfolly/Traits.h381///COMMENT
LOWfolly/Traits.h421/// likeCOMMENT
LOWfolly/Traits.h581COMMENT
LOWfolly/Traits.h601///COMMENT
LOWfolly/Traits.h681// is_nothrow_convertibleCOMMENT
LOWfolly/Traits.h1121 : std::bool_constant<is_non_bool_integral_v<Int>> {};COMMENT
LOWfolly/CppAttributes.h21#pragma onceCOMMENT
LOWfolly/CppAttributes.h81 * call-sites.COMMENT
LOWfolly/CppAttributes.h121#elif FOLLY_HAS_CPP_ATTRIBUTE(msvc::no_unique_address)COMMENT
LOWfolly/CppAttributes.h141 * type-based alias analysis, but are instead assumed to be able to alias anyCOMMENT
LOWfolly/CppAttributes.h161COMMENT
LOWfolly/CppAttributes.h181#define FOLLY_ATTR_GNU_NOCLONE gnu::nocloneCOMMENT
LOWfolly/CppAttributes.h201#define FOLLY_ATTR_CLANG_CORO_AWAIT_ELIDABLECOMMENT
LOWfolly/SocketAddress.h21#include <cstddef>COMMENT
LOWfolly/CMakeLists.txt1# Copyright (c) Meta Platforms, Inc. and affiliates.COMMENT
LOWfolly/Format.cpp181COMMENT
LOWfolly/IPAddress.h21 *COMMENT
LOWfolly/base64.h21#include <string>COMMENT
LOWfolly/base64.h41// (padding symbols are required on decoding)COMMENT
LOWfolly/base64.h61struct base64_decode_error;COMMENT
LOWfolly/ScopeGuard.h301ScopeGuardImpl<std::decay_t<FunctionType>, true> operator+(COMMENT
LOWfolly/ScopeGuard.h321// throw 0; // the cleanup happens at end of the scopeCOMMENT
LOWfolly/ScopeGuard.h361// SCOPE_FAILCOMMENT
LOWfolly/ScopeGuard.h381 *COMMENT
LOWfolly/ConcurrentBSkipList.h21// key capacity; P is the promotion denominator (see topLevelForKey).COMMENT
LOWfolly/ConcurrentBSkipList.h41#include <atomic>COMMENT
LOWfolly/Singleton.h21/// Recommended usage of this class: suppose you have a classCOMMENT
LOWfolly/Singleton.h41/// }COMMENT
LOWfolly/Singleton.h61///COMMENT
LOWfolly/Singleton.h81/// deleted via delete, but this is configurable:COMMENT
1567 more matches not shown…
Cross-Language Confusion51 hits · 266 pts
SeverityFileLineSnippetContext
HIGHfolly/python/test/iobuf.py363 self.assertEqual(xb.length(), 0)CODE
HIGHfolly/python/test/iobuf.py372 self.assertEqual(xb.length(), 15)CODE
HIGHfolly/python/test/iobuf.py409 self.assertEqual(xb.length(), 0)CODE
HIGHfolly/python/test/iobuf.py412 self.assertEqual(xb.length(), 16)CODE
HIGHfolly/python/test/iobuf.py416 self.assertEqual(xb.length(), 0)CODE
HIGHfolly/python/test/iobuf.py426 self.assertEqual(xb.length(), 0)CODE
HIGHfolly/python/test/iobuf.py436 self.assertEqual(xb.length(), 0)CODE
HIGHfolly/python/test/iobuf.py440 self.assertEqual(xb.length(), 16)CODE
HIGHfolly/python/test/iobuf.py444 self.assertEqual(xb.length(), 0)CODE
HIGHfolly/python/test/iobuf.py455 self.assertEqual(xb.length(), 0)CODE
HIGHfolly/python/test/iobuf.py458 self.assertEqual(xb.length(), 5)CODE
HIGHfolly/python/test/iobuf.py460 self.assertEqual(xb.length(), 0)CODE
HIGHfolly/python/test/iobuf.py471 self.assertEqual(xb.length(), 16)CODE
HIGHfolly/python/test/iobuf.py475 self.assertEqual(xb.length(), 10)CODE
HIGHfolly/python/test/iobuf.py478 self.assertEqual(xb.length(), 4)CODE
HIGHfolly/python/test/iobuf.py482 self.assertEqual(xb.length(), 0)CODE
HIGHfolly/python/test/iobuf.py485 self.assertEqual(xb.length(), 5)CODE
HIGHfolly/python/test/iobuf.py494 self.assertEqual(xb.length(), 0)CODE
HIGHfolly/python/test/iobuf.py497 self.assertEqual(xb.length(), 5)CODE
HIGHfolly/python/test/iobuf.py500 self.assertEqual(xb.length(), 0)CODE
HIGHfolly/python/test/iobuf.py504 self.assertEqual(xb.length(), 0)CODE
HIGHfolly/python/test/iobuf.py507 self.assertEqual(xb.length(), 5)CODE
HIGHfolly/python/test/iobuf.py517 self.assertEqual(xb.length(), 0)CODE
HIGHfolly/python/test/iobuf.py528 self.assertEqual(xb.length(), 0)CODE
HIGHfolly/python/test/iobuf.py531 self.assertEqual(xb.length(), 5)CODE
HIGHfolly/python/test/iobuf.py533 self.assertEqual(xb.length(), 0)CODE
HIGHfolly/python/test/iobuf.py544 self.assertEqual(xb.length(), 16)CODE
HIGHfolly/python/test/iobuf.py548 self.assertEqual(xb.length(), 10)CODE
HIGHfolly/python/test/iobuf.py551 self.assertEqual(xb.length(), 4)CODE
HIGHfolly/python/test/iobuf.py555 self.assertEqual(xb.length(), 0)CODE
HIGHfolly/python/test/iobuf.py558 self.assertEqual(xb.length(), 5)CODE
HIGHfolly/python/test/iobuf.py567 self.assertEqual(xb.length(), 0)CODE
HIGHfolly/python/test/iobuf.py570 self.assertEqual(xb.length(), 5)CODE
HIGHfolly/python/test/iobuf.py573 self.assertEqual(xb.length(), 0)CODE
HIGHfolly/python/test/iobuf.py577 self.assertEqual(xb.length(), 0)CODE
HIGHfolly/python/test/iobuf.py580 self.assertEqual(xb.length(), 5)CODE
HIGHfolly/python/test/iobuf.py590 self.assertEqual(xb.length(), 0)CODE
HIGHfolly/python/test/iobuf.py601 self.assertEqual(xb.length(), 0)CODE
HIGHfolly/python/test/iobuf.py604 self.assertEqual(xb.length(), 5)CODE
HIGHfolly/python/test/iobuf.py606 self.assertEqual(xb.length(), 0)CODE
HIGHfolly/python/test/iobuf.py608 self.assertEqual(xb.length(), 5)CODE
HIGHfolly/python/test/iobuf.py619 self.assertEqual(xb.length(), 16)CODE
HIGHfolly/python/test/iobuf.py623 self.assertEqual(xb.length(), 10)CODE
HIGHfolly/python/test/iobuf.py626 self.assertEqual(xb.length(), 16)CODE
HIGHfolly/python/test/iobuf.py630 self.assertEqual(xb.length(), 0)CODE
HIGHfolly/python/test/iobuf.py633 self.assertEqual(xb.length(), 5)CODE
HIGHfolly/python/test/iobuf.py635 self.assertEqual(xb.length(), 0)CODE
HIGHfolly/python/test/iobuf.py644 self.assertEqual(xb.length(), 0)CODE
HIGHfolly/python/test/iobuf.py647 self.assertEqual(xb.length(), 5)CODE
HIGHfolly/python/test/iobuf.py649 self.assertEqual(xb.length(), 0)CODE
HIGHfolly/python/test/iobuf.py659 self.assertEqual(xb.length(), 0)CODE
Hyper-Verbose Identifiers72 hits · 63 pts
SeverityFileLineSnippetContext
LOWfolly/python/test/test_iobuf_ext.py27 def test_iobuf_should_not_hang_when_outliving_asyncio_loop(self) -> None:CODE
LOWfolly/python/test/test_iobuf_ext.py60 def test_copy_from_buffer_bytes(self) -> None:CODE
LOWfolly/python/test/test_iobuf_ext.py74 def test_copy_from_buffer_bytearray(self) -> None:CODE
LOWfolly/python/test/test_iobuf_ext.py87 def test_copy_from_buffer_memoryview(self) -> None:CODE
LOWfolly/python/test/test_iobuf_ext.py96 def test_copy_from_buffer_does_not_pin_source_object(self) -> None:CODE
LOWfolly/python/test/teardown.py41 def test_fiber_manager_tear_down(self) -> None:CODE
LOWfolly/python/test/coro.py36 async def _return_five_after_cancelled(self) -> int:CODE
LOWfolly/python/test/coro.py88 def test_executor_stats_blocking(self) -> None:CODE
LOWfolly/python/test/test_set_executor.py28 def test_cannot_override_existing_loop(self):CODE
LOWfolly/python/test/request_context.py88 async def test_multiple_ctx_copies_memory_leak(self) -> None:CODE
LOWfolly/python/test/generator.py38 def test_iter_generator_empty(self) -> None:CODE
LOWfolly/python/test/generator.py53 def test_iter_generator_error(self) -> None:CODE
LOWfolly/python/test/iobuf.py355 def test_buffer_creation_with_size_write(self) -> None:CODE
LOWfolly/python/test/iobuf.py375 def test_buffer_creation_with_size_write_fail(self) -> None:CODE
LOWfolly/python/test/iobuf.py407 def test_buffer_creation_with_size_append(self) -> None:CODE
LOWfolly/python/test/iobuf.py414 def test_buffer_creation_with_size_append_fail(self) -> None:CODE
LOWfolly/python/test/iobuf.py424 def test_buffer_creation_with_size_append_fail_negative(self) -> None:CODE
LOWfolly/python/test/iobuf.py434 def test_buffer_creation_with_size_multiple_append(self) -> None:CODE
LOWfolly/python/test/iobuf.py442 def test_buffer_creation_with_size_multiple_append_fail(self) -> None:CODE
LOWfolly/python/test/iobuf.py453 def test_buffer_creation_with_size_trim_start(self) -> None:CODE
LOWfolly/python/test/iobuf.py462 def test_buffer_creation_with_size_write_trim_start(self) -> None:CODE
LOWfolly/python/test/iobuf.py480 def test_buffer_creation_with_size_trim_start_fail(self) -> None:CODE
LOWfolly/python/test/iobuf.py492 def test_buffer_creation_with_size_trim_start_multiple(self) -> None:CODE
LOWfolly/python/test/iobuf.py502 def test_buffer_creation_with_size_trim_start_fail_multiple(self) -> None:CODE
LOWfolly/python/test/iobuf.py515 def test_buffer_creation_with_size_trim_start_fail_negative(self) -> None:CODE
LOWfolly/python/test/iobuf.py526 def test_buffer_creation_with_size_trim_end(self) -> None:CODE
LOWfolly/python/test/iobuf.py535 def test_buffer_creation_with_size_write_trim_end(self) -> None:CODE
LOWfolly/python/test/iobuf.py553 def test_buffer_creation_with_size_trim_end_fail(self) -> None:CODE
LOWfolly/python/test/iobuf.py565 def test_buffer_creation_with_size_trim_end_multiple(self) -> None:CODE
LOWfolly/python/test/iobuf.py575 def test_buffer_creation_with_size_trim_end_fail_multiple(self) -> None:CODE
LOWfolly/python/test/iobuf.py588 def test_buffer_creation_with_size_trim_end_fail_negative(self) -> None:CODE
LOWfolly/python/test/iobuf.py599 def test_buffer_creation_with_size_prepend(self) -> None:CODE
LOWfolly/python/test/iobuf.py610 def test_buffer_creation_with_size_write_prepend(self) -> None:CODE
LOWfolly/python/test/iobuf.py628 def test_buffer_creation_with_size_prepend_fail(self) -> None:CODE
LOWfolly/python/test/iobuf.py642 def test_buffer_creation_with_size_prepend_fail_multiple(self) -> None:CODE
LOWfolly/python/test/iobuf.py657 def test_buffer_creation_with_size_prepend_fail_negative(self) -> None:CODE
LOWfolly/python/test/iobuf.py124 def test_conversion_from_python_to_cpp(self) -> None:CODE
LOWfolly/python/test/iobuf.py135 def test_conversion_from_python_to_cpp_with_wrong_type(self) -> None:CODE
LOWfolly/python/test/iobuf.py202 def test_buffer_update_in_place(self) -> None:CODE
LOWfolly/python/test/iobuf.py208 def test_buffer_write_out_of_bounds(self) -> None:CODE
LOWfolly/python/test/iobuf.py225 def test_buffer_read_out_of_bounds(self) -> None:CODE
LOWfolly/python/test/iobuf.py240 def test_buffer_write_empty_pieces(self) -> None:CODE
LOWfolly/python/test/iobuf.py266 def test_empty_writable_chain(self) -> None:CODE
LOWfolly/python/test/iobuf.py276 def test_appendable_writable_chain(self) -> None:CODE
LOWfolly/python/test/iobuf.py291 def test_appendable_writable_chain_overwrite(self) -> None:CODE
LOWfolly/python/test/iobuf.py317 def test_appendable_writable_chain_coalesce(self) -> None:CODE
LOWfolly/python/test/iobuf.py335 def test_appendable_writable_chain_coalesce_exception(self) -> None:CODE
LOWfolly/python/test/iobuf.py391 def test_buffer_creation_with_size_read_fail(self) -> None:CODE
LOWfolly/fibers/scripts/gdb.py834def fiber_manager_active_fibers(fm):CODE
LOWfolly/fibers/scripts/gdb.py888def get_fiber_manager_map_evb():CODE
LOWfolly/fibers/scripts/gdb.py892def get_fiber_manager_map_vevb():CODE
LOWfolly/docs/Synchronized.md18 class RequestHandler {CODE
LOWfolly/docs/Synchronized.md64 class RequestHandler {CODE
LOWfolly/json/test/tests/test_float_format_python_json.py61 def test_integer_valued_doubles(self) -> None:CODE
LOWfolly/json/test/tests/test_float_format_python_json.py64 def test_scientific_integer_mantissa(self) -> None:CODE
LOWfolly/json/test/tests/test_float_format_python_json.py80 def test_integer_valued_doubles(self) -> None:CODE
LOWfolly/json/test/tests/test_float_format_python_json.py85 def test_scientific_integer_mantissa(self) -> None:CODE
LOWfolly/json/test/tests/test_float_format_python_json.py104 def test_scientific_integer_mantissa(self) -> None:CODE
LOWfolly/json/test/tests/test_float_format_python_json.py116 def test_scientific_integer_mantissa(self) -> None:CODE
LOWfolly/json/test/tests/test_float_format_python_json.py119 def test_integer_valued_doubles(self) -> None:CODE
12 more matches not shown…
Verbosity Indicators21 hits · 44 pts
SeverityFileLineSnippetContext
LOWfolly/String.cpp550 // Step 1: Clear the high order bit. We'll deal with it in Step 5.COMMENT
LOWfolly/String.cpp557 // Step 2: Add 0x25 (37)COMMENT
LOWfolly/String.cpp564 // Step 3: clear the high order bitCOMMENT
LOWfolly/String.cpp570 // Step 4: Add 0x1a (26)COMMENT
LOWfolly/String.cpp579 // Step 5: Shift the high order bit 2 spaces to the right: the spotCOMMENT
LOWfolly/String.cpp590 // Step 6: Apply a mask to clear everything except the 0x20 bitCOMMENT
LOWfolly/String.cpp596 // Step 7: Add rotated to cCOMMENT
LOWfolly/IPAddressV6.cpp163 // Step 1: first 8 bytes are network prefix, and can be strippedCOMMENT
LOWfolly/IPAddressV6.cpp164 // Step 2: invert the universal/local (U/L) flag (bit 7)COMMENT
LOWfolly/IPAddressV6.cpp166 // Step 3: copy these bytes as they areCOMMENT
LOWfolly/IPAddressV6.cpp169 // Step 4: strip bytes (0xfffe), which are bytes_[11] and bytes_[12]COMMENT
LOWfolly/IPAddressV6.cpp170 // Step 5: copy the rest.COMMENT
LOWfolly/test/ConcurrentBSkipListTest.cpp1737 // Step 1: skipTo(100) → should return 500 (first non-deleted key >= 100)COMMENT
LOWfolly/test/ConcurrentBSkipListTest.cpp1745 // Step 2: skipTo(200) — target < lastResult. Folly returns 500 (stays put).COMMENT
LOWfolly/test/ConcurrentBSkipListTest.cpp1754 // Step 3: skipTo(300) — still < 500. Same.COMMENT
LOWfolly/test/ConcurrentBSkipListTest.cpp1762 // Step 4: skipTo(600) — past the jump, normal forwardCOMMENT
LOWfolly/algorithm/simd/test/MovemaskTest.cpp119 // Step 1:COMMENT
LOWfolly/algorithm/simd/test/MovemaskTest.cpp128 // Step 2:COMMENT
LOWfolly/compression/Compression.cpp1872 // Step 1:COMMENT
LOWfolly/compression/Compression.cpp1891 // Step 2:COMMENT
LOWfolly/stats/BucketedTimeSeries-inl.h123 // An earlier time in the past. We need to check if this time still fallsCOMMENT
AI Slop Vocabulary15 hits · 43 pts
SeverityFileLineSnippetContext
MEDIUMfolly/SharedMutex.h1612// std::shared_lock specialization for folly::SharedMutex to leverage tokenfulCOMMENT
MEDIUMfolly/MPMCQueue.h66/// which is more robust to contention than a CAS loop. Each of theCOMMENT
MEDIUMfolly/result/rich_error_base.h309/// writing rich errors to glog & `std` streams. This ought to be more robustCOMMENT
MEDIUMfolly/memory/Malloc.cpp81 // Absolutely wild, but this apparently needs to be cached within this TU.COMMENT
MEDIUMfolly/memory/Malloc.cpp118 // Absolutely wild, but this apparently needs to be cached within this TU.COMMENT
MEDIUMfolly/hash/detail/RandomSeed.h30// leverage ASLR (Address Space Layout Randomization) [2] to get a per-runCOMMENT
MEDIUMfolly/fibers/scripts/gdb.py251 # than the stack of the currently selected frame. Essentially, we takeCOMMENT
LOWfolly/fibers/scripts/gdb.py613# for a cached fiber will just return the same cached FiberInfo.COMMENT
LOWfolly/fibers/scripts/gdb.py792 # almost always 0 (used for frozen options). We'll ignore it and just useCOMMENT
MEDIUMfolly/lang/MustUseImmediately.h32// Essentially, this is a public analog of `folly::detail`. If you use it,COMMENT
MEDIUMfolly/lang/SafeAlias-fwd.h47 // Definitely has aliasing, we know nothing of the lifetime.COMMENT
MEDIUMfolly/detail/RangeSse42.cpp23// Essentially, two versions of this file: one with an SSE42 implementationCOMMENT
MEDIUMfolly/coro/safe/SafeTask.h134// Design note: Fundamentally, the reason that we have `member_task`, andCOMMENT
MEDIUMfolly/coro/safe/test/NowTaskTest.cpp74// expected call-path-to-awaiter. This is pretty robust, so long as I checkCOMMENT
MEDIUM…/coro/safe/detail/DefineMovableDeepConstLrefCopyable.h68// non-copyable, instead of the more nuanced behavior we need. ToCOMMENT
Structural Annotation Overuse17 hits · 38 pts
SeverityFileLineSnippetContext
LOWfolly/String.cpp550 // Step 1: Clear the high order bit. We'll deal with it in Step 5.COMMENT
LOWfolly/String.cpp557 // Step 2: Add 0x25 (37)COMMENT
LOWfolly/String.cpp564 // Step 3: clear the high order bitCOMMENT
LOWfolly/String.cpp570 // Step 4: Add 0x1a (26)COMMENT
LOWfolly/String.cpp579 // Step 5: Shift the high order bit 2 spaces to the right: the spotCOMMENT
LOWfolly/String.cpp590 // Step 6: Apply a mask to clear everything except the 0x20 bitCOMMENT
LOWfolly/String.cpp596 // Step 7: Add rotated to cCOMMENT
LOWfolly/IPAddressV6.cpp163 // Step 1: first 8 bytes are network prefix, and can be strippedCOMMENT
LOWfolly/IPAddressV6.cpp164 // Step 2: invert the universal/local (U/L) flag (bit 7)COMMENT
LOWfolly/IPAddressV6.cpp166 // Step 3: copy these bytes as they areCOMMENT
LOWfolly/IPAddressV6.cpp169 // Step 4: strip bytes (0xfffe), which are bytes_[11] and bytes_[12]COMMENT
LOWfolly/IPAddressV6.cpp170 // Step 5: copy the rest.COMMENT
LOWfolly/futures/Future.h2305/// NOTE: This function is deprecated. Please use makeSemiFuture and pass theCOMMENT
LOWfolly/test/ConcurrentBSkipListTest.cpp1737 // Step 1: skipTo(100) → should return 500 (first non-deleted key >= 100)COMMENT
LOWfolly/test/ConcurrentBSkipListTest.cpp1745 // Step 2: skipTo(200) — target < lastResult. Folly returns 500 (stays put).COMMENT
LOWfolly/test/ConcurrentBSkipListTest.cpp1754 // Step 3: skipTo(300) — still < 500. Same.COMMENT
LOWfolly/test/ConcurrentBSkipListTest.cpp1762 // Step 4: skipTo(600) — past the jump, normal forwardCOMMENT
Fake / Example Data17 hits · 23 pts
SeverityFileLineSnippetContext
LOWfolly/test/AsciiCaseInsensitiveBenchmark.cpp27 "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec a diam"CODE
LOWfolly/test/AsciiCaseInsensitiveBenchmark.cpp27 "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec a diam"CODE
LOWfolly/test/AsciiCaseInsensitiveBenchmark.cpp33 "tortor. Lorem ipsum dolor sit amet, consectetur adipiscing"CODE
LOWfolly/test/AsciiCaseInsensitiveBenchmark.cpp33 "tortor. Lorem ipsum dolor sit amet, consectetur adipiscing"CODE
LOWfolly/test/AsciiCaseInsensitiveBenchmark.cpp63 "tincidunt. Phasellus eget dolor sit amet ipsum dapibus condimentum"CODE
LOWfolly/test/ConvTest.cpp474 toAppend("Lorem ipsum ", 1234, String(" dolor amet "), 567.89, '!', &s);CODE
LOWfolly/test/ConvTest.cpp475 EXPECT_EQ(s, "Lorem ipsum 1234 dolor amet 567.89!");CODE
LOWfolly/test/ConvTest.cpp480 s = to<String>("Lorem ipsum ", nullptr, 1234, " dolor amet ", 567.89, '.');CODE
LOWfolly/test/ConvTest.cpp481 EXPECT_EQ(s, "Lorem ipsum 1234 dolor amet 567.89.");CODE
LOWfolly/test/ConvTest.cpp500 ":", "Lorem ipsum ", 1234, String(" dolor amet "), 567.89, '!', &s);CODE
LOWfolly/test/ConvTest.cpp501 EXPECT_EQ(s, "Lorem ipsum :1234: dolor amet :567.89:!");CODE
LOWfolly/test/ConvTest.cpp507 ":", "Lorem ipsum ", nullptr, 1234, " dolor amet ", 567.89, '.');CODE
LOWfolly/test/ConvTest.cpp508 EXPECT_EQ(s, "Lorem ipsum ::1234: dolor amet :567.89:.");CODE
LOWfolly/test/FBStringTest.cpp1276Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras accumsan \n\CODE
LOWfolly/test/FBStringTest.cpp1276Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras accumsan \n\CODE
LOWfolly/io/test/IOBufTest.cpp1326 const char data[] = "Lorem ipsum dolor sit amet, consectetur adipiscing elit";CODE
LOWfolly/io/test/IOBufTest.cpp1326 const char data[] = "Lorem ipsum dolor sit amet, consectetur adipiscing elit";CODE
Slop Phrases8 hits · 15 pts
SeverityFileLineSnippetContext
LOWfolly/FBString.h664 // Medium strings are copied eagerly. Don't forget to allocateCOMMENT
LOWfolly/FBString.h717 // Medium strings are allocated normally. Don't forget toCOMMENT
LOWfolly/FBString.h798 // Keep the string at medium size. Don't forget to allocateCOMMENT
LOWfolly/FBString.h831 // Don't forget to allocate one extra Char for the terminating nullCOMMENT
MEDIUMfolly/Format.h409 * so feel free to modify it in place if necessary. (For example, wrap anCOMMENT
LOWfolly/futures/test/FutureTest.cpp1155 // (Don't forget to enable ASAN)COMMENT
MEDIUMfolly/lang/MustUseImmediately.h558// As discussed above, this helps types manage object slicing risk.COMMENT
LOWfolly/container/HeterogeneousAccess.h50// the header that declares T. Don't forget to typedef is_transparent toCOMMENT
Excessive Try-Catch Wrapping10 hits · 12 pts
SeverityFileLineSnippetContext
LOWfolly/python/test/request_context.py173 except Exception as e:CODE
LOWfolly/coro/scripts/co_bt.py241 except Exception:CODE
LOWfolly/coro/scripts/co_bt.py503 except Exception:CODE
MEDIUMfolly/coro/scripts/co_bt.py504 print("Error collecting async stack trace:")CODE
LOWfolly/coro/scripts/co_bt.py574 except Exception:STRING
LOWfolly/coro/scripts/co_bt.py644 except Exception:STRING
LOWfolly/coro/scripts/co_bt.py705 except Exception:STRING
LOWfolly/coro/scripts/co_bt.py826 except Exception:STRING
MEDIUMfolly/coro/scripts/co_bt.py566def get_current_pthread_addr() -> DebuggerValue:CODE
MEDIUMfolly/coro/scripts/co_bt.py691def get_current_pthread_addr() -> DebuggerValue:CODE
Self-Referential Comments2 hits · 9 pts
SeverityFileLineSnippetContext
MEDIUMfolly/fibers/scripts/gdb.py611# This class is responsible for maintaining the name/address:fiberinfo mapping.COMMENT
MEDIUMfolly/fibers/scripts/gdb.py612# Creating a FiberInfo object adds it to the cache, and trying to create oneCOMMENT
Example Usage Blocks5 hits · 8 pts
SeverityFileLineSnippetContext
LOWfolly/CancellationToken.h141// Example usage:COMMENT
LOWfolly/container/vector_bool.h30/// Usage example:COMMENT
LOWfolly/coro/Baton.h43/// Example usage:COMMENT
LOWfolly/coro/SharedMutex.h83/// Example usage:COMMENT
LOWfolly/coro/AutoCleanup.h45/// Example usage:COMMENT
Synthetic Comment Markers1 hit · 8 pts
SeverityFileLineSnippetContext
HIGHfolly/io/async/test/AsyncSocketTest2.cpp2015 // Make sure the write attempt timed out as requestedCOMMENT
Redundant / Tautological Comments5 hits · 8 pts
SeverityFileLineSnippetContext
LOWfolly/support/gdb.py413 # Check if the segment has been initialized or setp over itCOMMENT
LOWfolly/support/gdb.py427 # Check if we're done with this segmentCOMMENT
LOWfolly/coro/scripts/co_bt.py221 # Check if the tls key is initializedCOMMENT
LOWfolly/coro/scripts/co_bt.py352 # Check if there is an AsyncStackRoot and if so, whether thereCOMMENT
LOWfolly/coro/scripts/co_bt.py370 # Check if there is a higher-level AsyncStackRoot that definesCOMMENT
Decorative Section Separators2 hits · 6 pts
SeverityFileLineSnippetContext
MEDIUMCMakeLists.txt243# =============================================================================COMMENT
MEDIUMCMakeLists.txt247# =============================================================================COMMENT
Deep Nesting4 hits · 4 pts
SeverityFileLineSnippetContext
LOWfolly/fibers/scripts/gdb.py711CODE
LOWfolly/fibers/scripts/gdb.py759CODE
LOWfolly/support/gdb.py25CODE
LOWfolly/support/gdb.py120CODE
TODO Padding2 hits · 3 pts
SeverityFileLineSnippetContext
LOWfolly/io/async/AsyncSSLSocket.h389 // TODO: implement graceful shutdown in close()COMMENT
LOWfolly/io/async/AsyncSSLSocket.h390 // TODO: implement detachSSL() that returns the SSL connectionCOMMENT
Modern Structural Boilerplate1 hit · 1 pts
SeverityFileLineSnippetContext
LOWfolly/python/test/request_context.py214 async def set_context() -> None:CODE
Unused Imports1 hit · 1 pts
SeverityFileLineSnippetContext
LOWfolly/json/test/tests/test_float_format_python_json.py17CODE