{
  "ml": {
    "v": "4",
    "fs": [
      {
        "id": 0,
        "prob": 0.9492878317832947,
        "class": 0
      }
    ],
    "prob": 0.94928783,
    "class": 0,
    "version": "v16.16",
    "thresholds": [
      0.9815004,
      0.99404883
    ],
    "analyzed_at": "2026-04-30T07:51:58Z"
  },
  "path": "struct_callback_spec.rb",
  "raw": {
    "v": "4",
    "fs": [
      {
        "f": "H(F)Md(Pa)",
        "x": 1,
        "id": 0,
        "is": [
          "require",
          "expand_path",
          "join",
          "dirname",
          "describe",
          "it",
          "to",
          "expect",
          "extend",
          "ffi_lib",
          "callback",
          "layout",
          "callback",
          "callback",
          "callback",
          "attach_function",
          "attach_function",
          "be_an_instance_of",
          "it",
          "extend",
          "ffi_lib",
          "layout",
          "callback",
          "callback",
          "attach_function",
          "attach_function",
          "new",
          "method",
          "to",
          "expect",
          "struct_call_add_cb",
          "eq",
          "it",
          "extend",
          "ffi_lib",
          "layout",
          "callback",
          "callback",
          "attach_function",
          "attach_function",
          "new",
          "new",
          "to",
          "expect",
          "respond_to?",
          "be",
          "to",
          "expect",
          "call",
          "eq",
          "File.expand_path(File.join(File.dirname(__FILE__), \"spec_helper\"))"
        ],
        "ms": {
          "text": {
            "digit_ratio": 0.01,
            "space_count": 470.0,
            "total_lines": 69.0,
            "char_entropy": 4.67,
            "unique_chars": 65.0,
            "import_density": 73.91,
            "string_density": 1.0,
            "avg_line_length": 30.39,
            "max_line_length": 74.0,
            "empty_line_ratio": 0.1,
            "last_line_length": 3.0,
            "most_common_char": "t",
            "whitespace_ratio": 0.25,
            "most_common_ratio": 0.07,
            "identifier_density": 1.03,
            "line_length_stddev": 22.81,
            "dynamic_import_ratio": 0.02,
            "normalized_import_count": 6.14,
            "normalized_string_count": 8.31,
            "repeated_char_sequences": 7.0,
            "max_inline_whitespace_run": 1.0,
            "normalized_function_count": 0.12,
            "imports_to_functions_ratio": 51.0,
            "strings_to_functions_ratio": 69.0,
            "suspicious_identifier_ratio": 0.11,
            "normalized_unique_identifiers": 4.58,
            "identifiers_to_functions_ratio": 28.0
          },
          "imports": {
            "total": 51.0,
            "unique_modules": 22.0,
            "dynamic_imports": 1.0,
            "third_party_count": 51.0,
            "third_party_ratio": 1.0
          },
          "strings": {
            "total": 69.0,
            "avg_length": 9.61,
            "max_length": 46.0,
            "avg_entropy": 2.33,
            "total_bytes": 663.0,
            "entropy_stddev": 0.71
          },
          "comments": {
            "chars": 64.0,
            "lines": 2.0,
            "total": 4.0,
            "to_code_ratio": 0.03,
            "empty_comments": 2.0
          },
          "functions": {
            "total": 1.0,
            "avg_name_length": 3.0,
            "no_params_count": 1.0,
            "avg_length_lines": 3.0,
            "max_length_lines": 3.0,
            "min_length_lines": 3.0,
            "density_per_100_lines": 1.45,
            "code_in_functions_ratio": 0.04
          },
          "identifiers": {
            "total": 71.0,
            "avg_length": 6.07,
            "max_length": 18.0,
            "min_length": 1.0,
            "avg_entropy": 1.86,
            "reuse_ratio": 0.39,
            "unique_count": 28.0,
            "length_stddev": 4.66,
            "sequential_names": 3.0,
            "single_char_count": 3.0,
            "single_char_ratio": 0.11,
            "all_lowercase_ratio": 0.93,
            "all_uppercase_ratio": 0.04,
            "double_underscore_count": 1.0,
            "underscore_prefix_count": 1.0
          }
        },
        "ss": [
          [
            132,
            "spec_helper"
          ],
          [
            133,
            "spec_helper"
          ],
          [
            171,
            " with inline callback functions"
          ],
          [
            172,
            " with inline callback functions"
          ],
          [
            213,
            "should be able to define inline callback field"
          ],
          [
            214,
            "should be able to define inline callback field"
          ],
          [
            383,
            "dummy_cb"
          ],
          [
            396,
            "int"
          ],
          [
            404,
            "int"
          ],
          [
            473,
            "add"
          ],
          [
            490,
            "int"
          ],
          [
            496,
            "int"
          ],
          [
            504,
            "int"
          ],
          [
            521,
            "sub"
          ],
          [
            538,
            "int"
          ],
          [
            544,
            "int"
          ],
          [
            552,
            "int"
          ],
          [
            569,
            "cb_with_cb_parameter"
          ],
          [
            613,
            "int"
          ],
          [
            621,
            "int"
          ],
          [
            659,
            "struct_call_add_cb"
          ],
          [
            693,
            "int"
          ],
          [
            699,
            "int"
          ],
          [
            706,
            "int"
          ],
          [
            733,
            "struct_call_sub_cb"
          ],
          [
            767,
            "int"
          ],
          [
            773,
            "int"
          ],
          [
            780,
            "int"
          ],
          [
            841,
            "should take methods as callbacks"
          ],
          [
            842,
            "should take methods as callbacks"
          ],
          [
            1028,
            "add"
          ],
          [
            1045,
            "int"
          ],
          [
            1051,
            "int"
          ],
          [
            1059,
            "int"
          ],
          [
            1076,
            "sub"
          ],
          [
            1093,
            "int"
          ],
          [
            1099,
            "int"
          ],
          [
            1107,
            "int"
          ],
          [
            1145,
            "struct_call_add_cb"
          ],
          [
            1179,
            "int"
          ],
          [
            1185,
            "int"
          ],
          [
            1192,
            "int"
          ],
          [
            1219,
            "struct_call_sub_cb"
          ],
          [
            1253,
            "int"
          ],
          [
            1259,
            "int"
          ],
          [
            1266,
            "int"
          ],
          [
            1409,
            "add"
          ],
          [
            1440,
            "add"
          ],
          [
            1525,
            "should return callable object from []"
          ],
          [
            1526,
            "should return callable object from []"
          ],
          [
            1717,
            "add"
          ],
          [
            1734,
            "int"
          ],
          [
            1740,
            "int"
          ],
          [
            1748,
            "int"
          ],
          [
            1765,
            "sub"
          ],
          [
            1782,
            "int"
          ],
          [
            1788,
            "int"
          ],
          [
            1796,
            "int"
          ],
          [
            1834,
            "struct_call_add_cb"
          ],
          [
            1868,
            "int"
          ],
          [
            1874,
            "int"
          ],
          [
            1881,
            "int"
          ],
          [
            1908,
            "struct_call_sub_cb"
          ],
          [
            1942,
            "int"
          ],
          [
            1948,
            "int"
          ],
          [
            1955,
            "int"
          ],
          [
            2047,
            "add"
          ],
          [
            2070,
            "add"
          ],
          [
            2102,
            "call"
          ]
        ],
        "sz": 2166,
        "ts": [
          {
            "a": "T1059",
            "c": 0.800000011920929,
            "d": "Self-reference via __FILE__",
            "e": [
              "__FILE__"
            ],
            "i": "micro-behaviors/fs/read/self::self-file-reference",
            "l": 3
          },
          {
            "c": 0.8999999761581421,
            "d": "File has 30 or more lines",
            "e": [
              "text.total_lines = 69.00"
            ],
            "i": "metadata/package/metrics::file-has-30-plus-lines",
            "l": 1
          },
          {
            "c": 0.949999988079071,
            "d": "imports File.expand_path(File.join(File.dirname(__FILE__), \"spec_helper\"))",
            "e": [
              "File.expand_path(File.join(File.dirname(__FILE__), \"spec_helper\"))"
            ],
            "i": "metadata/import/ruby::file/expand_path-file/join-file/dirname-__file__-spec_helper",
            "l": 2
          }
        ],
        "sha": "82f1404e048639c1e4f54751b53215fb54f40e4cadb11a043fde13e18df48903",
        "path": "struct_callback_spec.rb",
        "type": "ruby"
      }
    ],
    "tv": "f6eaa"
  }
}