id int64 0 328k | repository_name stringlengths 7 58 | file_path stringlengths 9 302 | class_name stringlengths 5 256 | human_written_code stringlengths 16 2.16M | class_skeleton stringlengths 18 1.49M ⌀ | total_program_units int64 1 1.76k | total_doc_str int64 0 771 | AvgCountLine float64 0 7.89k | AvgCountLineBlank float64 0 297 | AvgCountLineCode float64 0 7.89k | AvgCountLineComment float64 0 7.89k | AvgCyclomatic float64 0 130 | CommentToCodeRatio float64 0 168 | CountClassBase float64 0 40 | CountClassCoupled float64 0 583 | CountClassCoupledModified float64 0 575 | CountClassDerived float64 0 5.35k | CountDeclInstanceMethod float64 0 529 | CountDeclInstanceVariable float64 0 296 | CountDeclMethod float64 0 599 | CountDeclMethodAll float64 0 1.12k | CountLine float64 1 40.4k | CountLineBlank float64 0 8.16k | CountLineCode float64 1 25.7k | CountLineCodeDecl float64 1 8.15k | CountLineCodeExe float64 0 24.2k | CountLineComment float64 0 16.5k | CountStmt float64 1 9.71k | CountStmtDecl float64 1 8.15k | CountStmtExe float64 0 9.69k | MaxCyclomatic float64 0 759 | MaxInheritanceTree float64 0 16 | MaxNesting float64 0 34 | SumCyclomatic float64 0 2.9k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
327,000 | codegen-sh/graph-sitter | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/cli/errors.py | cli.errors.InvalidTokenError | class InvalidTokenError(AuthError):
"""Error raised if the token is invalid."""
pass | class InvalidTokenError(AuthError):
'''Error raised if the token is invalid.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.5 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 4 | 1 | 2 | 1 | 1 | 1 | 2 | 1 | 1 | 0 | 4 | 0 | 0 |
327,001 | codegen-sh/graph-sitter | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/cli/errors.py | cli.errors.NoTokenError | class NoTokenError(AuthError):
"""Error raised if no token is provided."""
pass | class NoTokenError(AuthError):
'''Error raised if no token is provided.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.5 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 4 | 1 | 2 | 1 | 1 | 1 | 2 | 1 | 1 | 0 | 4 | 0 | 0 |
327,002 | codegen-sh/graph-sitter | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/cli/errors.py | cli.errors.ServerError | class ServerError(CodegenError):
"""Error raised when the server encounters an error."""
pass | class ServerError(CodegenError):
'''Error raised when the server encounters an error.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.5 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 4 | 1 | 2 | 1 | 1 | 1 | 2 | 1 | 1 | 0 | 4 | 0 | 0 |
327,003 | codegen-sh/graph-sitter | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/cli/sdk/decorator.py | cli.sdk.decorator.DecoratedFunction | from functools import wraps
from collections.abc import Callable, Sequence
from typing import Literal, ParamSpec, TypeVar, get_type_hints
from graph_sitter.shared.enums.programming_language import ProgrammingLanguage
class DecoratedFunction:
"""Represents a Python function decorated with a codegen decorator."""
... |
class DecoratedFunction:
'''Represents a Python function decorated with a codegen decorator.'''
def __init__(self, name: str, *, subdirectories: list[str] | None=None, language: ProgrammingLanguage | None=None, webhook_config: dict | None=None, lint_mode: bool=False, lint_user_whitelist: Sequence[str] | None=... | 5 | 1 | 11 | 1 | 10 | 1 | 2 | 0.1 | 0 | 7 | 1 | 0 | 2 | 8 | 2 | 2 | 36 | 4 | 29 | 23 | 15 | 3 | 19 | 13 | 15 | 2 | 0 | 1 | 5 |
327,004 | codegen-sh/graph-sitter | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/cli/sdk/models.py | cli.sdk.models.PullRequest | from dataclasses import dataclass
@dataclass
class PullRequest:
"""A pull request created by a codemod."""
url: str
number: int
title: str | @dataclass
class PullRequest:
'''A pull request created by a codemod.'''
pass | 2 | 1 | 0 | 0 | 0 | 0 | 0 | 0.25 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 | 1 | 4 | 1 | 3 | 1 | 4 | 1 | 3 | 0 | 0 | 0 | 0 |
327,005 | codegen-sh/graph-sitter | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/runner/clients/client.py | client.Client | from graph_sitter.runner.models.apis import ServerInfo
from fastapi import params
import requests
class Client:
"""Client for interacting with the sandbox server."""
host: str
port: int
base_url: str
def __init__(self, host: str, port: int) -> None:
self.host = host
self.port = por... |
class Client:
'''Client for interacting with the sandbox server.'''
def __init__(self, host: str, port: int) -> None:
pass
def is_running(self) -> bool:
pass
def server_info(self, raise_on_error: bool=False) -> ServerInfo:
pass
def get(self, endpoint: str, data: dict | N... | 6 | 1 | 6 | 0 | 6 | 0 | 2 | 0.03 | 0 | 6 | 1 | 2 | 5 | 0 | 5 | 5 | 40 | 6 | 33 | 12 | 27 | 1 | 33 | 12 | 27 | 3 | 0 | 2 | 9 |
327,006 | codegen-sh/graph-sitter | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/typescript/detached_symbols/code_block.py | code_block.TSCodeBlock | from graph_sitter.core.detached_symbols.code_block import CodeBlock
from typing import TYPE_CHECKING, Generic, Self, TypeVar
from graph_sitter.core.autocommit import reader, writer
from graph_sitter.core.symbol_groups.multi_line_collection import MultiLineCollection
from graph_sitter.compiled.utils import find_line_sta... | @ts_apidoc
class TSCodeBlock(CodeBlock[Parent, 'TSAssignment'], Generic[Parent]):
'''Extends the CodeBlock class to provide TypeScript-specific functionality.'''
@noapidoc
@reader
def _parse_statements(self) -> MultiLineCollection[Statement, Self]:
pass
@reader
@noapidoc
def _get_lin... | 13 | 4 | 12 | 1 | 8 | 3 | 2 | 0.34 | 2 | 3 | 1 | 0 | 4 | 3 | 4 | 6 | 61 | 6 | 41 | 21 | 29 | 14 | 23 | 14 | 18 | 3 | 1 | 1 | 8 |
327,007 | codegen-sh/graph-sitter | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/code_generation/current_code_codebase.py | code_generation.current_code_codebase.DocumentedObjects | from typing import TypedDict
from graph_sitter.shared.decorators.docs import DocumentedObject, apidoc_objects, no_apidoc_objects, py_apidoc_objects, ts_apidoc_objects
class DocumentedObjects(TypedDict):
apidoc: list[DocumentedObject]
ts_apidoc: list[DocumentedObject]
py_apidoc: list[DocumentedObject]
n... |
class DocumentedObjects(TypedDict):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 | 0 | 5 | 1 | 4 | 0 | 5 | 1 | 4 | 0 | 1 | 0 | 0 |
327,008 | codegen-sh/graph-sitter | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/code_generation/doc_utils/schemas.py | code_generation.doc_utils.schemas.ClassDoc | from pydantic import BaseModel
from pydantic.fields import Field
class ClassDoc(BaseModel):
title: str = Field(..., description='The title of the class')
description: str = Field(..., description='The description of the class')
content: str = Field(..., description='The content of the class')
path: str... |
class ClassDoc(BaseModel):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 82 | 10 | 0 | 10 | 10 | 9 | 0 | 10 | 10 | 9 | 0 | 5 | 0 | 0 |
327,009 | codegen-sh/graph-sitter | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/code_generation/doc_utils/schemas.py | code_generation.doc_utils.schemas.GSDocs | from pydantic.fields import Field
from pydantic import BaseModel
class GSDocs(BaseModel):
classes: list[ClassDoc] = Field(..., description='The classes to document') |
class GSDocs(BaseModel):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 82 | 2 | 0 | 2 | 2 | 1 | 0 | 2 | 2 | 1 | 0 | 5 | 0 | 0 |
327,010 | codegen-sh/graph-sitter | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/code_generation/doc_utils/schemas.py | code_generation.doc_utils.schemas.MethodDoc | from pydantic import BaseModel
from typing import Literal
from pydantic.fields import Field
class MethodDoc(BaseModel):
name: str = Field(..., description='The name of the method')
description: str | None = Field(..., description='The description of the method')
parameters: list[ParameterDoc] = Field(..., ... |
class MethodDoc(BaseModel):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 82 | 13 | 0 | 13 | 13 | 12 | 0 | 13 | 13 | 12 | 0 | 5 | 0 | 0 |
327,011 | codegen-sh/graph-sitter | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/code_generation/doc_utils/schemas.py | code_generation.doc_utils.schemas.ParameterDoc | from pydantic.fields import Field
from pydantic import BaseModel
class ParameterDoc(BaseModel):
name: str = Field(..., description='The name of the parameter')
description: str = Field(..., description='The description of the parameter')
type: str = Field(..., description='The type of the parameter')
d... |
class ParameterDoc(BaseModel):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 82 | 5 | 0 | 5 | 5 | 4 | 0 | 5 | 5 | 4 | 0 | 5 | 0 | 0 |
327,012 | codegen-sh/graph-sitter | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/code_generation/enums.py | code_generation.enums.DocumentationDecorators | from enum import StrEnum
class DocumentationDecorators(StrEnum):
PYTHON = 'py_apidoc'
TYPESCRIPT = 'ts_apidoc'
CODEMOD = 'canonical'
GENERAL_API = 'apidoc' |
class DocumentationDecorators(StrEnum):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 68 | 5 | 0 | 5 | 5 | 4 | 0 | 5 | 5 | 4 | 0 | 3 | 0 | 0 |
327,013 | codegen-sh/graph-sitter | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/configs/models/codebase.py | codebase.CodebaseConfig | from graph_sitter.configs.models.base_config import BaseConfig
from pydantic import Field
class CodebaseConfig(BaseConfig):
def __init__(self, prefix: str='CODEBASE', *args, **kwargs) -> None:
super().__init__(*args, prefix=prefix, **kwargs)
debug: bool = False
verify_graph: bool = False
track... |
class CodebaseConfig(BaseConfig):
def __init__(self, prefix: str='CODEBASE', *args, **kwargs) -> None:
pass | 2 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 2 | 0 | 0 | 1 | 0 | 1 | 25 | 25 | 1 | 24 | 23 | 22 | 0 | 24 | 23 | 22 | 1 | 5 | 0 | 1 |
327,014 | codegen-sh/graph-sitter | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/configs/models/codebase.py | codebase.PinkMode | from enum import IntEnum, auto
class PinkMode(IntEnum):
OFF = auto()
ALL_FILES = auto()
NON_SOURCE_FILES = auto() |
class PinkMode(IntEnum):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0.75 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 55 | 7 | 0 | 4 | 4 | 3 | 3 | 4 | 4 | 3 | 0 | 3 | 0 | 0 |
327,015 | codegen-sh/graph-sitter | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/codebase/codebase_context.py | codebase.codebase_context.CodebaseContext | from graph_sitter.codebase.validation import get_edges, post_reset_validation
from graph_sitter.codebase.transaction_manager import TransactionManager
from graph_sitter.codebase.progress.stub_progress import StubProgress
from graph_sitter.codebase.io.file_io import FileIO
from graph_sitter.typescript.external.ts_declas... |
class CodebaseContext:
'''MultiDiGraph Wrapper with TransactionManager'''
def __init__(self, projects: list[ProjectConfig], config: CodebaseConfig | None=None, secrets: SecretsConfig | None=None, io: IO | None=None, progress: Progress | None=None) -> None:
'''Initializes codebase graph and Transaction... | 66 | 11 | 14 | 1 | 12 | 2 | 4 | 0.16 | 0 | 49 | 29 | 0 | 46 | 6 | 46 | 46 | 752 | 83 | 582 | 155 | 506 | 91 | 533 | 129 | 483 | 36 | 0 | 5 | 175 |
327,016 | codegen-sh/graph-sitter | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/codebase/codebase_context.py | codebase.codebase_context.SyncType | from enum import IntEnum, auto, unique
@unique
class SyncType(IntEnum):
DELETE = auto()
REPARSE = auto()
ADD = auto() | @unique
class SyncType(IntEnum):
pass | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 55 | 4 | 0 | 4 | 4 | 3 | 0 | 4 | 4 | 3 | 0 | 3 | 0 | 0 |
327,017 | codegen-sh/graph-sitter | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/codebase/config.py | codebase.config.ProjectConfig | from graph_sitter.git.schemas.repo_config import RepoConfig
from pydantic import BaseModel
from graph_sitter.git.utils.language import determine_project_language
from graph_sitter.shared.enums.programming_language import ProgrammingLanguage
from graph_sitter.git.repo_operator.repo_operator import RepoOperator
from pyda... |
class ProjectConfig(BaseModel):
'''Context for a codebase. A codebase is a set of files in a directory.'''
@classmethod
def from_path(cls, path: str, programming_language: ProgrammingLanguage | None=None) -> Self:
pass
@classmethod
def from_repo_operator(cls, repo_operator: RepoOperator, pr... | 5 | 1 | 12 | 0 | 11 | 1 | 2 | 0.14 | 1 | 4 | 3 | 0 | 0 | 0 | 2 | 84 | 37 | 4 | 29 | 13 | 24 | 4 | 17 | 11 | 14 | 2 | 5 | 0 | 4 |
327,018 | codegen-sh/graph-sitter | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/codebase/config.py | codebase.config.SessionOptions | from pydantic.config import ConfigDict
from pydantic import BaseModel
from pydantic.fields import Field
class SessionOptions(BaseModel):
"""Options for a session. A session is a single codemod run."""
model_config = ConfigDict(frozen=True)
max_seconds: int | None = None
max_transactions: int | None = N... |
class SessionOptions(BaseModel):
'''Options for a session. A session is a single codemod run.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.2 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 82 | 7 | 1 | 5 | 5 | 4 | 1 | 5 | 5 | 4 | 0 | 5 | 0 | 0 |
327,019 | codegen-sh/graph-sitter | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/codebase/config_parser.py | codebase.config_parser.ConfigParser | from abc import ABC, abstractmethod
class ConfigParser(ABC):
def __init__(self):
pass
@abstractmethod
def parse_configs(self, codebase_context: 'CodebaseContext'):
... |
class ConfigParser(ABC):
def __init__(self):
pass
@abstractmethod
def parse_configs(self, codebase_context: 'CodebaseContext'):
pass | 4 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 0 | 0 | 1 | 2 | 0 | 2 | 22 | 6 | 1 | 5 | 4 | 2 | 0 | 5 | 3 | 2 | 1 | 4 | 0 | 2 |
327,020 | codegen-sh/graph-sitter | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/codebase/diff_lite.py | codebase.diff_lite.ChangeType | from enum import IntEnum, auto
from watchfiles import Change
class ChangeType(IntEnum):
Modified = auto()
Removed = auto()
Renamed = auto()
Added = auto()
@staticmethod
def from_watch_change_type(change_type: Change):
if change_type is Change.added:
return ChangeType.Added
... |
class ChangeType(IntEnum):
@staticmethod
def from_watch_change_type(change_type: Change):
pass
@staticmethod
def from_git_change_type(change_type: str | None):
pass | 5 | 0 | 9 | 0 | 9 | 0 | 5 | 0 | 1 | 2 | 0 | 0 | 0 | 0 | 2 | 57 | 27 | 2 | 25 | 10 | 20 | 0 | 21 | 8 | 18 | 5 | 3 | 1 | 9 |
327,021 | codegen-sh/graph-sitter | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/codebase/diff_lite.py | codebase.diff_lite.DiffLite | from watchfiles import Change
from pathlib import Path
from typing import NamedTuple, Self
from os import PathLike
from git import Diff
class DiffLite(NamedTuple):
"""Simple diff for recomputing the graph"""
change_type: ChangeType
path: Path
rename_from: Path | None = None
rename_to: Path | None =... |
class DiffLite(NamedTuple):
'''Simple diff for recomputing the graph'''
@classmethod
def from_watch_change(cls, change: Change, path: PathLike) -> Self:
pass
@classmethod
def from_git_diff(cls, git_diff: Diff):
pass
@classmethod
def from_reverse_diff(cls, diff_lite: 'DiffLit... | 7 | 1 | 11 | 1 | 10 | 0 | 3 | 0.03 | 1 | 3 | 1 | 0 | 0 | 0 | 3 | 3 | 47 | 6 | 40 | 12 | 33 | 1 | 21 | 9 | 17 | 5 | 1 | 1 | 10 |
327,022 | codegen-sh/graph-sitter | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/codebase/multigraph.py | codebase.multigraph.MultiGraph | from typing import Generic, TypeVar
from collections import defaultdict
from dataclasses import dataclass, field
from graph_sitter.core.detached_symbols.function_call import FunctionCall
@dataclass
class MultiGraph(Generic[TFunction]):
"""Mapping of API endpoints to their definitions and usages across languages.""... | @dataclass
class MultiGraph(Generic[TFunction]):
'''Mapping of API endpoints to their definitions and usages across languages.'''
pass | 2 | 1 | 0 | 0 | 0 | 0 | 0 | 0.33 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 2 | 5 | 1 | 3 | 3 | 2 | 1 | 3 | 3 | 2 | 0 | 1 | 0 | 0 |
327,023 | codegen-sh/graph-sitter | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/codebase/node_classes/node_classes.py | codebase.node_classes.node_classes.NodeClasses | from graph_sitter.core.interfaces.resolvable import Resolvable
from dataclasses import dataclass, field
from functools import cached_property
@dataclass
class NodeClasses:
file_cls: type[SourceFile]
class_cls: type[Class]
function_cls: type[Function]
import_cls: type[Import]
parameter_cls: type[Par... | @dataclass
class NodeClasses:
@cached_property
def resolvables(self) -> set[str]:
pass | 4 | 0 | 4 | 0 | 4 | 0 | 1 | 0.05 | 0 | 4 | 1 | 0 | 1 | 0 | 1 | 1 | 25 | 2 | 22 | 10 | 19 | 1 | 21 | 9 | 19 | 1 | 0 | 0 | 1 |
327,024 | codegen-sh/graph-sitter | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/codebase/range_index.py | codebase.range_index.RangeIndex | from tree_sitter import Range
from functools import cached_property
import itertools
from graph_sitter.compiled.sort import sort_editables
from collections import defaultdict
from graph_sitter.core.interfaces.editable import Editable
class RangeIndex:
_ranges: defaultdict[Range, list[Editable]]
_canonical_rang... |
class RangeIndex:
def __init__(self):
pass
def add_to_range(self, editable: Editable) -> None:
pass
def mark_as_canonical(self, editable: Editable) -> None:
pass
def get_all_for_range(self, range: Range) -> list[Editable]:
pass
def get_canonical_for_range(self, ... | 12 | 0 | 3 | 0 | 3 | 0 | 1 | 0.06 | 0 | 5 | 1 | 0 | 9 | 0 | 9 | 9 | 43 | 9 | 32 | 15 | 20 | 2 | 30 | 12 | 20 | 3 | 0 | 2 | 12 |
327,025 | codegen-sh/graph-sitter | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/codebase/span.py | codebase.span.Span | from tree_sitter import Point, Range
from graph_sitter.shared.decorators.docs import apidoc
from pydantic import BaseModel
from pydantic.config import ConfigDict
@apidoc
class Span(BaseModel):
"""Range within the codebase
Attributes:
range: Adapter for the range within the codebase.
filepath: ... | @apidoc
class Span(BaseModel):
'''Range within the codebase
Attributes:
range: Adapter for the range within the codebase.
filepath: The path to the file associated with the range.
'''
pass | 2 | 1 | 0 | 0 | 0 | 0 | 0 | 0.24 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 82 | 28 | 2 | 21 | 2 | 20 | 5 | 4 | 2 | 3 | 0 | 5 | 0 | 0 |
327,026 | codegen-sh/graph-sitter | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/codebase/transaction_manager.py | codebase.transaction_manager.TransactionError | class TransactionError(Exception):
pass | class TransactionError(Exception):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 2 | 0 | 2 | 1 | 1 | 0 | 2 | 1 | 1 | 0 | 3 | 0 | 0 |
327,027 | codegen-sh/graph-sitter | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/codebase/transaction_manager.py | codebase.transaction_manager.TransactionManager | from pathlib import Path
from graph_sitter.codebase.transactions import EditTransaction, FileAddTransaction, FileRemoveTransaction, FileRenameTransaction, RemoveTransaction, Transaction, TransactionPriority
from graph_sitter.codebase.diff_lite import ChangeType, DiffLite
import time
from graph_sitter.shared.exceptions.... |
class TransactionManager:
'''Responsible for handling `Transaction` objects - basically an atomic modification of a codebase.
This is used by the Codebase class to queue up transactions and then commit them in bulk.
'''
def __init__(self) -> None:
pass
def sort_transactions(self) -> N... | 25 | 10 | 10 | 0 | 8 | 1 | 3 | 0.28 | 0 | 20 | 12 | 0 | 23 | 0 | 23 | 23 | 277 | 40 | 186 | 63 | 161 | 53 | 165 | 57 | 140 | 11 | 0 | 5 | 68 |
327,028 | codegen-sh/graph-sitter | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/codebase/transactions.py | codebase.transactions.ContentFunc | from typing import TYPE_CHECKING, Protocol, runtime_checkable
@runtime_checkable
class ContentFunc(Protocol):
"""A function executed to generate a content block dynamically."""
def __call__(self) -> str:
... | @runtime_checkable
class ContentFunc(Protocol):
'''A function executed to generate a content block dynamically.'''
def __call__(self) -> str:
pass | 3 | 1 | 1 | 0 | 1 | 0 | 1 | 0.5 | 1 | 1 | 0 | 0 | 1 | 0 | 1 | 25 | 4 | 1 | 2 | 2 | 1 | 1 | 3 | 2 | 1 | 1 | 5 | 0 | 1 |
327,029 | codegen-sh/graph-sitter | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/codebase/transactions.py | codebase.transactions.EditTransaction | from graph_sitter.codebase.diff_lite import ChangeType, DiffLite
from difflib import unified_diff
class EditTransaction(Transaction):
transaction_order = TransactionPriority.Edit
new_content: str
def __init__(self, start_byte: int, end_byte: int, file: 'File', new_content: str, priority: int=0) -> None:
... |
class EditTransaction(Transaction):
def __init__(self, start_byte: int, end_byte: int, file: 'File', new_content: str, priority: int=0) -> None:
pass
def _generate_new_content_bytes(self) -> bytes:
pass
def execute(self) -> None:
'''Edits the entirety of this node's source to new... | 7 | 3 | 6 | 0 | 6 | 1 | 2 | 0.08 | 1 | 8 | 3 | 0 | 6 | 4 | 6 | 16 | 46 | 6 | 37 | 27 | 23 | 3 | 30 | 17 | 23 | 4 | 1 | 2 | 9 |
327,030 | codegen-sh/graph-sitter | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/codebase/transactions.py | codebase.transactions.FileAddTransaction | from graph_sitter.codebase.diff_lite import ChangeType, DiffLite
from pathlib import Path
class FileAddTransaction(Transaction):
transaction_order = TransactionPriority.FileAdd
def __init__(self, file_path: Path, priority: int=0) -> None:
super().__init__(0, 0, file_path, priority=priority)
def e... |
class FileAddTransaction(Transaction):
def __init__(self, file_path: Path, priority: int=0) -> None:
pass
def execute(self) -> None:
'''Adds a new file'''
pass
def get_diff(self) -> DiffLite:
'''Gets the diff produced by this transaction'''
pass
def diff_str(... | 5 | 3 | 4 | 0 | 3 | 1 | 1 | 0.29 | 1 | 6 | 2 | 0 | 4 | 0 | 4 | 14 | 21 | 4 | 14 | 10 | 5 | 4 | 10 | 6 | 5 | 1 | 1 | 0 | 4 |
327,031 | codegen-sh/graph-sitter | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/codebase/transactions.py | codebase.transactions.FileRemoveTransaction | from graph_sitter.codebase.diff_lite import ChangeType, DiffLite
class FileRemoveTransaction(Transaction):
transaction_order = TransactionPriority.FileRemove
def __init__(self, file: 'File', priority: int=0) -> None:
super().__init__(0, 0, file.path, priority=priority)
self.file = file
de... |
class FileRemoveTransaction(Transaction):
def __init__(self, file: 'File', priority: int=0) -> None:
pass
def execute(self) -> None:
'''Removes the file'''
pass
def get_diff(self) -> DiffLite:
'''Gets the diff produced by this transaction'''
pass
def diff_str... | 5 | 3 | 4 | 0 | 3 | 1 | 1 | 0.2 | 1 | 5 | 2 | 0 | 4 | 2 | 4 | 14 | 22 | 4 | 15 | 12 | 6 | 3 | 11 | 7 | 6 | 1 | 1 | 0 | 4 |
327,032 | codegen-sh/graph-sitter | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/codebase/transactions.py | codebase.transactions.FileRenameTransaction | from graph_sitter.codebase.diff_lite import ChangeType, DiffLite
class FileRenameTransaction(Transaction):
transaction_order = TransactionPriority.FileRename
def __init__(self, file: 'File', new_file_path: str, priority: int=0) -> None:
super().__init__(0, 0, file.path, priority=priority, new_content=... |
class FileRenameTransaction(Transaction):
def __init__(self, file: 'File', new_file_path: str, priority: int=0) -> None:
pass
def execute(self) -> None:
'''Renames the file'''
pass
def get_diff(self) -> DiffLite:
'''Gets the diff produced by this transaction'''
pa... | 5 | 3 | 5 | 0 | 4 | 1 | 1 | 0.17 | 1 | 5 | 2 | 0 | 4 | 3 | 4 | 14 | 25 | 4 | 18 | 14 | 8 | 3 | 13 | 8 | 8 | 1 | 1 | 0 | 4 |
327,033 | codegen-sh/graph-sitter | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/codebase/transactions.py | codebase.transactions.InsertTransaction | from collections.abc import Callable
from difflib import unified_diff
from graph_sitter.codebase.diff_lite import ChangeType, DiffLite
class InsertTransaction(Transaction):
transaction_order = TransactionPriority.Insert
exec_func: Callable[[], None] | None = None
def __init__(self, insert_byte: int, file:... |
class InsertTransaction(Transaction):
def __init__(self, insert_byte: int, file: 'File', new_content: str | Callable[[], str], *, priority: int | tuple=0, exec_func: Callable[[], None] | None=None) -> None:
pass
def _generate_new_content_bytes(self) -> bytes:
pass
def execute(self) -> No... | 6 | 3 | 6 | 0 | 6 | 1 | 1 | 0.09 | 1 | 8 | 2 | 0 | 5 | 4 | 5 | 15 | 41 | 6 | 32 | 25 | 18 | 3 | 24 | 16 | 18 | 2 | 1 | 1 | 6 |
327,034 | codegen-sh/graph-sitter | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/codebase/transactions.py | codebase.transactions.RemoveTransaction | from collections.abc import Callable
from difflib import unified_diff
from graph_sitter.codebase.diff_lite import ChangeType, DiffLite
class RemoveTransaction(Transaction):
transaction_order = TransactionPriority.Remove
exec_func: Callable[[], None] | None = None
def __init__(self, start_byte: int, end_by... |
class RemoveTransaction(Transaction):
def __init__(self, start_byte: int, end_byte: int, file: 'File', priority: int=0, exec_func: Callable[[], None] | None=None) -> None:
pass
def _generate_new_content_bytes(self) -> bytes:
pass
def execute(self) -> None:
'''Removes the content ... | 6 | 3 | 4 | 0 | 3 | 1 | 1 | 0.15 | 1 | 7 | 2 | 0 | 5 | 2 | 5 | 15 | 29 | 6 | 20 | 13 | 14 | 3 | 20 | 12 | 14 | 2 | 1 | 1 | 6 |
327,035 | codegen-sh/graph-sitter | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/codebase/transactions.py | codebase.transactions.Transaction | from collections.abc import Callable
from pathlib import Path
from graph_sitter.codebase.diff_lite import ChangeType, DiffLite
from functools import cached_property
class Transaction:
start_byte: int
end_byte: int
file_path: Path
priority: int | tuple
transaction_order: TransactionPriority
tran... |
class Transaction:
def __init__(self, start_byte: int, end_byte: int, file_path: Path, priority: int | tuple=0, new_content: str | None | Callable[[], str]=None) -> None:
pass
def __repr__(self) -> str:
pass
def __hash__(self):
pass
def __eq__(self, other):
pass
... | 13 | 2 | 6 | 0 | 5 | 1 | 1 | 0.15 | 0 | 9 | 2 | 6 | 10 | 2 | 10 | 10 | 76 | 13 | 55 | 27 | 35 | 8 | 40 | 18 | 29 | 2 | 0 | 1 | 13 |
327,036 | codegen-sh/graph-sitter | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/codebase/transactions.py | codebase.transactions.TransactionPriority | from enum import IntEnum
class TransactionPriority(IntEnum):
Remove = 0
Edit = 1
Insert = 2
FileAdd = 10
FileRename = 11
FileRemove = 12 |
class TransactionPriority(IntEnum):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0.57 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 55 | 8 | 0 | 7 | 7 | 6 | 4 | 7 | 7 | 6 | 0 | 3 | 0 | 0 |
327,037 | codegen-sh/graph-sitter | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/codebase/validation.py | codebase.validation.PostInitValidationStatus | from enum import StrEnum
class PostInitValidationStatus(StrEnum):
NO_NODES = 'NO_NODES'
NO_EDGES = 'NO_EDGES'
MISSING_FILES = 'MISSING_FILES'
LOW_IMPORT_RESOLUTION_RATE = 'LOW_IMPORT_RESOLUTION_RATE'
SUCCESS = 'SUCCESS' |
class PostInitValidationStatus(StrEnum):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 68 | 6 | 0 | 6 | 6 | 5 | 0 | 6 | 6 | 5 | 0 | 3 | 0 | 0 |
327,038 | codegen-sh/graph-sitter | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/runner/clients/codebase_client.py | codebase_client.CodebaseClient | from graph_sitter.git.schemas.repo_config import RepoConfig
import subprocess
from graph_sitter.configs.models.secrets import SecretsConfig
from graph_sitter.runner.clients.client import Client
from graph_sitter.runner.models.apis import SANDBOX_SERVER_PORT
import time
import os
class CodebaseClient(Client):
"""Cl... |
class CodebaseClient(Client):
'''Client for interacting with the locally hosted sandbox server.'''
def __init__(self, repo_config: RepoConfig, host: str='127.0.0.1', port: int=SANDBOX_SERVER_PORT, server_path: str=RUNNER_SERVER_PATH):
pass
def __del__(self):
'''Cleanup the subprocess when... | 6 | 4 | 9 | 0 | 8 | 1 | 2 | 0.09 | 1 | 9 | 2 | 0 | 5 | 3 | 5 | 10 | 56 | 8 | 44 | 14 | 38 | 4 | 29 | 12 | 23 | 3 | 1 | 2 | 8 |
327,039 | codegen-sh/graph-sitter | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/codebase/factory/codebase_factory.py | codebase_factory.CodebaseFactory | from graph_sitter.git.repo_operator.repo_operator import RepoOperator
from graph_sitter.core.codebase import Codebase, CodebaseType
from graph_sitter.configs.models.secrets import SecretsConfig
from graph_sitter.shared.enums.programming_language import ProgrammingLanguage
from graph_sitter.codebase.config import Projec... |
class CodebaseFactory:
@staticmethod
def get_codebase_from_files(repo_path: str='/tmp/codegen_run_on_str', files: dict[str, str]={}, bot_commit: bool=True, programming_language: ProgrammingLanguage=ProgrammingLanguage.PYTHON, config: CodebaseConfig | None=None, secrets: SecretsConfig | None=None) -> CodebaseT... | 3 | 0 | 11 | 0 | 11 | 0 | 1 | 0.23 | 0 | 9 | 6 | 0 | 0 | 0 | 1 | 1 | 17 | 1 | 13 | 12 | 3 | 3 | 5 | 4 | 3 | 1 | 0 | 0 | 1 |
327,040 | codegen-sh/graph-sitter | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/runner/models/codemod.py | codemod.BranchConfig | from pydantic import BaseModel
class BranchConfig(BaseModel):
branch_name: str | None = None
custom_base_branch: str | None = None
custom_head_branch: str | None = None
force_push_head_branch: bool = False |
class BranchConfig(BaseModel):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 82 | 5 | 0 | 5 | 5 | 4 | 0 | 5 | 5 | 4 | 0 | 5 | 0 | 0 |
327,041 | codegen-sh/graph-sitter | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/codemods/codemod.py | codemod.Codemod | from collections.abc import Callable
class Codemod:
execute: Callable | None = None
def __init__(self, name: str | None=None, execute: Callable | None=None, *args, **kwargs):
self.name = name
if execute:
self.execute = execute |
class Codemod:
def __init__(self, name: str | None=None, execute: Callable | None=None, *args, **kwargs):
pass | 2 | 0 | 4 | 0 | 4 | 0 | 2 | 0 | 0 | 2 | 0 | 43 | 1 | 1 | 1 | 1 | 7 | 1 | 6 | 4 | 4 | 0 | 6 | 4 | 4 | 2 | 0 | 1 | 2 |
327,042 | codegen-sh/graph-sitter | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/runner/models/codemod.py | codemod.Codemod | from graph_sitter.git.models.codemod_context import CodemodContext
from pydantic import BaseModel
class Codemod(BaseModel):
user_code: str
codemod_context: CodemodContext = CodemodContext() |
class Codemod(BaseModel):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 82 | 3 | 0 | 3 | 2 | 2 | 0 | 3 | 2 | 2 | 0 | 5 | 0 | 0 |
327,043 | codegen-sh/graph-sitter | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/runner/models/codemod.py | codemod.CodemodRunResult | from datetime import datetime
from graph_sitter.git.models.pr_options import PROptions
from pydantic import BaseModel
class CodemodRunResult(BaseModel):
is_complete: bool = False
observation: str | None = None
visualization: dict | None = None
observation_meta: dict | None = None
base_commit: str |... |
class CodemodRunResult(BaseModel):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 82 | 12 | 0 | 12 | 12 | 11 | 0 | 12 | 12 | 11 | 0 | 5 | 0 | 0 |
327,044 | codegen-sh/graph-sitter | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/runner/models/codemod.py | codemod.CreatedBranch | from pydantic import BaseModel
class CreatedBranch(BaseModel):
base_branch: str
head_ref: str | None = None |
class CreatedBranch(BaseModel):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 82 | 3 | 0 | 3 | 2 | 2 | 0 | 3 | 2 | 2 | 0 | 5 | 0 | 0 |
327,045 | codegen-sh/graph-sitter | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/runner/models/codemod.py | codemod.GroupingConfig | from pydantic import BaseModel
from graph_sitter.codebase.flagging.groupers.enums import GroupBy
class GroupingConfig(BaseModel):
subdirectories: list[str] | None = None
group_by: GroupBy | None = None
max_prs: int | None = None |
class GroupingConfig(BaseModel):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 82 | 4 | 0 | 4 | 4 | 3 | 0 | 4 | 4 | 3 | 0 | 5 | 0 | 0 |
327,046 | codegen-sh/graph-sitter | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/runner/models/codemod.py | codemod.SandboxRunnerTag | from pydantic import BaseModel
class SandboxRunnerTag(BaseModel):
repo_id: str
runner_id: str |
class SandboxRunnerTag(BaseModel):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 82 | 3 | 0 | 3 | 1 | 2 | 0 | 3 | 1 | 2 | 0 | 5 | 0 | 0 |
327,047 | codegen-sh/graph-sitter | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/git/models/codemod_context.py | codemod_context.CodemodContext | from pydantic import BaseModel
from importlib.metadata import version
from pydantic.fields import Field
from graph_sitter.git.models.pull_request_context import PullRequestContext
from typing import Any
class CodemodContext(BaseModel):
GRAPH_SITTER_VERSION: str = version('graph-sitter')
CODEMOD_ID: int | None ... |
class CodemodContext(BaseModel):
@classmethod
def _render_template(cls, template_schema: dict[str, str], template_values: dict[str, Any]) -> dict[str, Any]:
pass | 3 | 0 | 10 | 1 | 9 | 0 | 3 | 0.18 | 1 | 3 | 0 | 0 | 0 | 0 | 1 | 83 | 24 | 4 | 17 | 12 | 14 | 3 | 15 | 11 | 13 | 3 | 5 | 2 | 3 |
327,048 | codegen-sh/graph-sitter | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/cli/utils/codemod_manager.py | codemod_manager.CodemodManager | import builtins
from graph_sitter.cli.utils.function_finder import DecoratedFunction, find_codegen_functions
import rich_click as click
from pathlib import Path
class CodemodManager:
"""Manages codemod operations in the local filesystem."""
@staticmethod
def get_valid_name(name: str) -> str:
retur... |
class CodemodManager:
'''Manages codemod operations in the local filesystem.'''
@staticmethod
def get_valid_name(name: str) -> str:
pass
@classmethod
def get_codemod(cls, name: str, start_path: Path | None=None) -> DecoratedFunction:
'''Get and validate a codemod by name.
Ar... | 13 | 6 | 18 | 3 | 8 | 7 | 3 | 0.75 | 0 | 7 | 1 | 0 | 0 | 0 | 6 | 6 | 120 | 26 | 55 | 26 | 42 | 41 | 48 | 19 | 41 | 7 | 0 | 3 | 17 |
327,049 | codegen-sh/graph-sitter | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/cli/utils/codemods.py | codemods.Codemod | from pathlib import Path
from dataclasses import dataclass
from graph_sitter.cli.utils.schema import CodemodConfig
@dataclass
class Codemod:
"""Represents a codemod in the local filesystem."""
name: str
path: Path
config: CodemodConfig | None = None
def relative_path(self) -> str:
"""Get t... | @dataclass
class Codemod:
'''Represents a codemod in the local filesystem.'''
def relative_path(self) -> str:
'''Get the relative path to this codemod.'''
pass
def get_current_source(self) -> str:
'''Get the current source code for this codemod.'''
pass
def get_system_... | 6 | 5 | 4 | 0 | 3 | 1 | 1 | 0.29 | 0 | 2 | 0 | 0 | 4 | 0 | 4 | 4 | 27 | 5 | 17 | 8 | 12 | 5 | 17 | 8 | 12 | 2 | 0 | 1 | 5 |
327,050 | codegen-sh/graph-sitter | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/extensions/lsp/codemods/base.py | codemods.base.CodeAction | from graph_sitter.core.interfaces.editable import Editable
from lsprotocol import types
from abc import ABC, abstractmethod
from typing import TYPE_CHECKING, ClassVar
class CodeAction(ABC):
name: str
kind: ClassVar[types.CodeActionKind] = types.CodeActionKind.Refactor
def __init__(self):
pass
... |
class CodeAction(ABC):
def __init__(self):
pass
@abstractmethod
def execute(self, server: 'GraphSitterLanguageServer', node: Editable) -> None:
pass
@abstractmethod
def is_applicable(self, server: 'GraphSitterLanguageServer', node: Editable) -> bool:
pass
def to_comman... | 10 | 0 | 3 | 0 | 3 | 0 | 1 | 0 | 1 | 3 | 1 | 2 | 5 | 0 | 6 | 26 | 30 | 6 | 24 | 11 | 16 | 0 | 15 | 8 | 8 | 1 | 4 | 0 | 6 |
327,051 | codegen-sh/graph-sitter | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/extensions/lsp/codemods/move_symbol_to_file.py | codemods.move_symbol_to_file.MoveSymbolToFile | from graph_sitter.core.interfaces.editable import Editable
from graph_sitter.extensions.lsp.codemods.base import CodeAction
class MoveSymbolToFile(CodeAction):
name = 'Move Symbol to File'
def is_applicable(self, server: 'GraphSitterLanguageServer', node: Editable) -> bool:
return True
def execut... |
class MoveSymbolToFile(CodeAction):
def is_applicable(self, server: 'GraphSitterLanguageServer', node: Editable) -> bool:
pass
def execute(self, server: 'GraphSitterLanguageServer', node: Editable) -> None:
pass | 3 | 0 | 5 | 0 | 5 | 0 | 2 | 0 | 1 | 2 | 1 | 0 | 2 | 0 | 2 | 28 | 14 | 2 | 12 | 5 | 9 | 0 | 9 | 5 | 6 | 2 | 5 | 1 | 3 |
327,052 | codegen-sh/graph-sitter | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/codebase/flagging/groupers/codeowner_grouper.py | codeowner_grouper.CodeownerGrouper | from graph_sitter.codebase.flagging.groupers.enums import GroupBy
from graph_sitter.codebase.flagging.group import Group
from graph_sitter.codebase.flagging.code_flag import CodeFlag
from graph_sitter.codebase.flagging.groupers.base_grouper import BaseGrouper
from graph_sitter.git.repo_operator.repo_operator import Rep... |
class CodeownerGrouper(BaseGrouper):
'''Group flags by CODEOWNERS.
Parses .github/CODEOWNERS and groups by each possible codeowners
Segment should be either a github username or github team name.
'''
@staticmethod
def create_all_groups(flags: list[CodeFlag], repo_operator: RepoOperator | None=N... | 5 | 1 | 10 | 1 | 9 | 1 | 2 | 0.29 | 1 | 9 | 4 | 0 | 0 | 0 | 2 | 5 | 32 | 6 | 21 | 13 | 16 | 6 | 19 | 11 | 16 | 3 | 1 | 2 | 4 |
327,053 | codegen-sh/graph-sitter | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/typescript/symbol_groups/comment_group.py | comment_group.TSCommentGroup | from graph_sitter.shared.decorators.docs import noapidoc, ts_apidoc
from graph_sitter.typescript.statements.comment import TSComment, TSCommentType
from graph_sitter.core.symbol_groups.comment_group import CommentGroup
@ts_apidoc
class TSCommentGroup(CommentGroup):
"""A group of related symbols that represent a co... | @ts_apidoc
class TSCommentGroup(CommentGroup):
'''A group of related symbols that represent a comment or docstring in TypeScript
For example:
```
// Comment 1
// Comment 2
// Comment 3
```
would be 3 individual comments (accessible via `symbols`), but together they form a `CommentGroup` ... | 17 | 2 | 18 | 3 | 13 | 3 | 5 | 0.33 | 1 | 4 | 2 | 0 | 0 | 0 | 5 | 64 | 114 | 19 | 75 | 26 | 59 | 25 | 63 | 21 | 57 | 8 | 7 | 3 | 24 |
327,054 | codegen-sh/graph-sitter | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/shared/exceptions/compilation.py | compilation.DangerousUserCodeException | class DangerousUserCodeException(UserCodeException):
"""Custom exception user code that has dangerous / not permitted operations.""" | class DangerousUserCodeException(UserCodeException):
'''Custom exception user code that has dangerous / not permitted operations.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 2 | 0 | 1 | 1 | 0 | 1 | 1 | 1 | 0 | 0 | 4 | 0 | 0 |
327,055 | codegen-sh/graph-sitter | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/shared/exceptions/compilation.py | compilation.InvalidUserCodeException | class InvalidUserCodeException(UserCodeException):
"""Custom exception for user code that can be compiled/executed. Ex: syntax errors, indentation errors, name errors etc.""" | class InvalidUserCodeException(UserCodeException):
'''Custom exception for user code that can be compiled/executed. Ex: syntax errors, indentation errors, name errors etc.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 2 | 0 | 1 | 1 | 0 | 1 | 1 | 1 | 0 | 0 | 4 | 0 | 0 |
327,056 | codegen-sh/graph-sitter | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/shared/exceptions/compilation.py | compilation.UserCodeException | class UserCodeException(Exception):
"""Custom exception for any issues in user code.""" | class UserCodeException(Exception):
'''Custom exception for any issues in user code.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 2 | 0 | 0 | 0 | 10 | 2 | 0 | 1 | 1 | 0 | 1 | 1 | 1 | 0 | 0 | 3 | 0 | 0 |
327,057 | codegen-sh/graph-sitter | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/python/expressions/conditional_expression.py | conditional_expression.PyConditionalExpression | from graph_sitter.shared.decorators.docs import py_apidoc
from graph_sitter.core.expressions.ternary_expression import TernaryExpression
@py_apidoc
class PyConditionalExpression(TernaryExpression[Parent]):
"""Conditional Expressions (A if condition else B)"""
def __init__(self, ts_node, file_node_id, ctx, par... | @py_apidoc
class PyConditionalExpression(TernaryExpression[Parent]):
'''Conditional Expressions (A if condition else B)'''
def __init__(self, ts_node, file_node_id, ctx, parent: Parent) -> None:
pass | 3 | 1 | 5 | 0 | 5 | 0 | 1 | 0.17 | 1 | 1 | 0 | 0 | 1 | 3 | 1 | 12 | 8 | 1 | 6 | 5 | 4 | 1 | 6 | 5 | 4 | 1 | 3 | 0 | 1 |
327,058 | codegen-sh/graph-sitter | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/typescript/expressions/conditional_type.py | conditional_type.TSConditionalType | from graph_sitter.codebase.resolution_stack import ResolutionStack
from typing import TYPE_CHECKING, Generic, Self, TypeVar, override
from graph_sitter.core.dataclasses.usage import UsageKind
from tree_sitter import Node as TSNode
from graph_sitter.core.node_id_factory import NodeId
from graph_sitter.shared.decorators.... | @ts_apidoc
class TSConditionalType(Type[Parent], Generic[Parent]):
'''Conditional Type
Examples:
typeof s
Attributes:
left: The left-hand side type of the conditional type.
right: The right-hand side type of the conditional type.
consequence: The type if the condition is true.
... | 8 | 1 | 5 | 0 | 5 | 0 | 1 | 0.41 | 2 | 4 | 2 | 0 | 3 | 0 | 3 | 34 | 37 | 6 | 22 | 5 | 15 | 9 | 19 | 4 | 15 | 1 | 5 | 0 | 3 |
327,059 | codegen-sh/graph-sitter | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/shared/exceptions/control_flow.py | control_flow.MaxAIRequestsError | class MaxAIRequestsError(StopCodemodException):
"""Raised when the number of AI requests exceeds the max_ai_requests limit.
This gets caught upstream and causes an early exit so that we can surface a subset of the
results to the user for faster iteration.
""" | class MaxAIRequestsError(StopCodemodException):
'''Raised when the number of AI requests exceeds the max_ai_requests limit.
This gets caught upstream and causes an early exit so that we can surface a subset of the
results to the user for faster iteration.
'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 4 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 11 | 6 | 1 | 1 | 1 | 0 | 4 | 1 | 1 | 0 | 0 | 4 | 0 | 0 |
327,060 | codegen-sh/graph-sitter | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/shared/exceptions/control_flow.py | control_flow.MaxPreviewTimeExceeded | class MaxPreviewTimeExceeded(StopCodemodException):
"""Raised when more than the allotted time has passed for previewing transactions. Enables us to keep it at like ~5s in the frontend during debugging""" | class MaxPreviewTimeExceeded(StopCodemodException):
'''Raised when more than the allotted time has passed for previewing transactions. Enables us to keep it at like ~5s in the frontend during debugging'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 11 | 2 | 0 | 1 | 1 | 0 | 1 | 1 | 1 | 0 | 0 | 4 | 0 | 0 |
327,061 | codegen-sh/graph-sitter | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/shared/exceptions/control_flow.py | control_flow.MaxTransactionsExceeded | class MaxTransactionsExceeded(StopCodemodException):
"""Raised when the number of transactions exceeds the max_transactions limit.
This gets caught upstream and causes an early exit so that we can surface a subset of the results to the user for faster iteration.
""" | class MaxTransactionsExceeded(StopCodemodException):
'''Raised when the number of transactions exceeds the max_transactions limit.
This gets caught upstream and causes an early exit so that we can surface a subset of the results to the user for faster iteration.
'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 3 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 11 | 4 | 0 | 1 | 1 | 0 | 3 | 1 | 1 | 0 | 0 | 4 | 0 | 0 |
327,062 | codegen-sh/graph-sitter | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/shared/exceptions/control_flow.py | control_flow.StopCodemodException | class StopCodemodException(Exception):
"""Raises when the codemod execution should stop early.
This gets caught upstream and causes an early exit so that we can surface a subset of the results to the user for faster iteration.
"""
threshold: int | None = None
def __init__(self, message: str | None=... | class StopCodemodException(Exception):
'''Raises when the codemod execution should stop early.
This gets caught upstream and causes an early exit so that we can surface a subset of the results to the user for faster iteration.
'''
def __init__(self, message: str | None=None, threshold: int | None=None)... | 2 | 1 | 3 | 0 | 3 | 0 | 1 | 0.6 | 1 | 3 | 0 | 3 | 1 | 0 | 1 | 11 | 10 | 2 | 5 | 3 | 3 | 3 | 5 | 3 | 3 | 1 | 3 | 0 | 1 |
327,063 | codegen-sh/graph-sitter | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/core/assignment.py | core.assignment.Assignment | from graph_sitter.typescript.expressions.object_type import TSObjectType
from graph_sitter.compiled.sort import sort_editables
from typing import TYPE_CHECKING, Generic, Self, TypeVar, override
from graph_sitter._proxy import proxy_property
from graph_sitter.core.dataclasses.usage import UsageKind
from graph_sitter.cor... | @apidoc
class Assignment(Symbol[Parent, ...], Typeable[Parent, ...], HasValue, Generic[Parent]):
'''Represents an assignment for a single variable within an assignment statement.
Example:
```typescript
var z
var z = 5
```
Attributes:
symbol_type: The type of symbol, s... | 39 | 8 | 13 | 1 | 8 | 3 | 4 | 0.39 | 4 | 16 | 9 | 2 | 13 | 5 | 15 | 27 | 243 | 40 | 147 | 63 | 105 | 57 | 118 | 43 | 100 | 16 | 3 | 8 | 54 |
327,064 | codegen-sh/graph-sitter | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/core/autocommit/constants.py | core.autocommit.constants.AutoCommitState | from enum import IntEnum, unique
@unique
class AutoCommitState(IntEnum):
"""Current operation."""
Write = 0
Read = 1
Committing = 2
Special = 4 | @unique
class AutoCommitState(IntEnum):
'''Current operation.'''
pass | 2 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 55 | 7 | 1 | 5 | 5 | 4 | 5 | 5 | 5 | 4 | 0 | 3 | 0 | 0 |
327,065 | codegen-sh/graph-sitter | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/core/autocommit/constants.py | core.autocommit.constants.IllegalWriteError | class IllegalWriteError(Exception):
"""Indicates there is a write, move, or commit called inside a read, commit, or repr
function.
"""
pass | class IllegalWriteError(Exception):
'''Indicates there is a write, move, or commit called inside a read, commit, or repr
function.
'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 1.5 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 6 | 1 | 2 | 1 | 1 | 3 | 2 | 1 | 1 | 0 | 3 | 0 | 0 |
327,066 | codegen-sh/graph-sitter | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/core/autocommit/constants.py | core.autocommit.constants.NodeNotFoundError | class NodeNotFoundError(Exception):
"""Indicates a node was not found during the update process, such as when editing the type."""
pass | class NodeNotFoundError(Exception):
'''Indicates a node was not found during the update process, such as when editing the type.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.5 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 4 | 1 | 2 | 1 | 1 | 1 | 2 | 1 | 1 | 0 | 3 | 0 | 0 |
327,067 | codegen-sh/graph-sitter | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/core/autocommit/constants.py | core.autocommit.constants.OutdatedNodeError | class OutdatedNodeError(Exception):
"""Indicates a node is out of date."""
def __init__(self, node: 'Editable') -> None:
parent = node
from graph_sitter.core.symbol import Symbol
while parent is not None and (not isinstance(parent, Symbol)):
parent = parent.parent
su... | class OutdatedNodeError(Exception):
'''Indicates a node is out of date.'''
def __init__(self, node: 'Editable') -> None:
pass | 2 | 1 | 17 | 1 | 16 | 0 | 3 | 0.06 | 1 | 2 | 1 | 0 | 1 | 0 | 1 | 11 | 20 | 2 | 17 | 4 | 14 | 1 | 7 | 4 | 4 | 3 | 3 | 1 | 3 |
327,068 | codegen-sh/graph-sitter | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/core/autocommit/manager.py | core.autocommit.manager.AutoCommit | from contextlib import contextmanager
from pathlib import Path
from graph_sitter.compiled.autocommit import update_dict
from typing import TYPE_CHECKING, Optional, Union
from collections.abc import Iterator
from graph_sitter.core.autocommit.constants import REMOVED, AutoCommitState, AutoCommitSymbol, IllegalWriteError,... |
class AutoCommit:
'''Global autocommit state.
Attributes:
state: Current operation being performed
_files: Mapping of files to their new filepaths, or None if they were just modified
_nodes: Mapping of nodes to their new Node IDs
_locked_files: All files that are currently being... | 18 | 10 | 13 | 0 | 12 | 1 | 3 | 0.15 | 0 | 11 | 6 | 0 | 15 | 0 | 15 | 15 | 233 | 19 | 186 | 61 | 142 | 28 | 132 | 30 | 116 | 8 | 0 | 4 | 51 |
327,069 | codegen-sh/graph-sitter | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/core/autocommit/manager.py | core.autocommit.manager.AutoCommitNode | from typing import TYPE_CHECKING, Optional, Union
from dataclasses import dataclass
from graph_sitter.core.autocommit.constants import REMOVED, AutoCommitState, AutoCommitSymbol, IllegalWriteError, NodeNotFoundError, OutdatedNodeError
from graph_sitter.core.node_id_factory import NodeId
@dataclass
class AutoCommitNode... | @dataclass
class AutoCommitNode:
'''The pending update for a node.
Attributes:
symbol: The symbol being updated. Kept to ensure correctness
generation: Version of the symbol
new_id: New id to fetch (if applicable)
new_file: File symbol was moved to (if applicable)
'''
pas... | 2 | 1 | 0 | 0 | 0 | 0 | 0 | 1.4 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 14 | 2 | 5 | 3 | 4 | 7 | 5 | 3 | 4 | 0 | 0 | 0 | 0 |
327,070 | codegen-sh/graph-sitter | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/core/autocommit/manager.py | core.autocommit.manager.PendingFiles | from dataclasses import dataclass
from pathlib import Path
@dataclass
class PendingFiles:
"""Current files autocommit is operating on.
For example, if we read a symbol and find another symbol out of date in the same file, we would
not want to update it.
"""
files: set[Path] | None
all: bool = ... | @dataclass
class PendingFiles:
'''Current files autocommit is operating on.
For example, if we read a symbol and find another symbol out of date in the same file, we would
not want to update it.
'''
def __bool__(self) -> bool:
pass | 3 | 1 | 2 | 0 | 2 | 0 | 1 | 0.8 | 0 | 1 | 0 | 0 | 1 | 0 | 1 | 1 | 12 | 3 | 5 | 2 | 3 | 4 | 5 | 2 | 3 | 1 | 0 | 0 | 1 |
327,071 | codegen-sh/graph-sitter | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/core/class_definition.py | core.class_definition.Class | from graph_sitter.visualizations.enums import VizNode
from graph_sitter.core.autocommit import commiter, reader, writer
from graph_sitter.compiled.utils import cached_property
from typing import TYPE_CHECKING, Generic, Literal, Self, overload, override
from graph_sitter.core.interfaces.callable import Callable
from gra... | @apidoc
class Class(Inherits[TType], HasBlock[TCodeBlock, TDecorator], Callable[TParameter, TType], HasAttribute[TFunction | Attribute], Generic[TFunction, TDecorator, TCodeBlock, TParameter, TType]):
'''Abstract representation of a Class definition.
Attributes:
symbol_type: The type of symbol, set to S... | 63 | 18 | 12 | 2 | 5 | 5 | 3 | 0.85 | 5 | 10 | 5 | 2 | 25 | 5 | 25 | 32 | 365 | 67 | 161 | 86 | 103 | 137 | 125 | 57 | 99 | 8 | 3 | 4 | 66 |
327,072 | codegen-sh/graph-sitter | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/core/codebase.py | core.codebase.Codebase | from graph_sitter.configs.models.secrets import SecretsConfig
from networkx import Graph
from graph_sitter.git.schemas.repo_config import RepoConfig
from github.PullRequest import PullRequest
from graph_sitter.git.schemas.enums import CheckoutResult
from graph_sitter.configs.models.codebase import CodebaseConfig, PinkM... | @apidoc
class Codebase(Generic[TSourceFile, TDirectory, TSymbol, TClass, TFunction, TImport, TGlobalVar, TInterface, TTypeAlias, TParameter, TCodeBlock]):
'''This class provides the main entrypoint for most programs to analyzing and manipulating codebases.
Attributes:
viz: Manages visualization of the c... | 136 | 63 | 16 | 2 | 8 | 6 | 2 | 0.74 | 1 | 46 | 30 | 0 | 74 | 2 | 78 | 80 | 1,454 | 262 | 689 | 319 | 453 | 508 | 484 | 163 | 399 | 11 | 1 | 4 | 173 |
327,073 | codegen-sh/graph-sitter | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/core/codeowner.py | core.codeowner.CodeOwner | from typing import Generic, Literal
from graph_sitter._proxy import proxy_property
from codeowners import CodeOwners as CodeOwnersParser
from graph_sitter.core.interfaces.has_symbols import FilesParam, HasSymbols, TClass, TFile, TFunction, TGlobalVar, TImport, TImportStatement, TSymbol
from graph_sitter.core.utils.cach... | @apidoc
class CodeOwner(HasSymbols[TFile, TSymbol, TImportStatement, TGlobalVar, TClass, TFunction, TImport], Generic[TFile, TSymbol, TImportStatement, TGlobalVar, TClass, TFunction, TImport]):
'''CodeOwner is a class that represents a code owner in a codebase.
It is used to iterate over all files that are owne... | 15 | 4 | 6 | 0 | 4 | 1 | 2 | 0.36 | 2 | 5 | 0 | 0 | 7 | 0 | 8 | 25 | 77 | 13 | 47 | 29 | 21 | 17 | 30 | 13 | 21 | 3 | 2 | 2 | 12 |
327,074 | codegen-sh/graph-sitter | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/core/detached_symbols/argument.py | core.detached_symbols.argument.Argument | from typing import TYPE_CHECKING, Generic, TypeVar, override
from graph_sitter.core.expressions import Expression
from graph_sitter.core.interfaces.has_name import HasName
from graph_sitter.core.expressions.name import Name
from graph_sitter.shared.decorators.docs import apidoc, noapidoc
from graph_sitter.core.autocomm... | @apidoc
class Argument(Expression[Parent], HasName, HasValue, Generic[Parent, TParameter]):
'''Represents an argument passed into a FunctionCall.'''
def __init__(self, node: TSNode, positional_idx: int, parent: FunctionCall) -> None:
pass
def __repr__(self) -> str:
pass
@noapidoc
@... | 32 | 7 | 9 | 1 | 4 | 3 | 2 | 0.58 | 4 | 10 | 3 | 0 | 10 | 2 | 11 | 21 | 134 | 28 | 67 | 31 | 36 | 39 | 46 | 21 | 34 | 4 | 1 | 1 | 20 |
327,075 | codegen-sh/graph-sitter | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/core/detached_symbols/code_block.py | core.detached_symbols.code_block.CodeBlock | from graph_sitter.core.statements.statement import Statement, StatementType
from graph_sitter.compiled.utils import find_line_start_and_end_nodes
from graph_sitter.core.expressions import Expression, Value
from graph_sitter.compiled.sort import sort_editables
from collections import deque
from graph_sitter.core.autocom... | @apidoc
class CodeBlock(Expression[Parent], Generic[Parent, TAssignment]):
'''Container class for a list of code Statements that share an indentation level, e.g. a
function body or class body.
Enables various types of queries and operations on the code block.
Attributes:
level: The indentation l... | 81 | 28 | 13 | 2 | 4 | 6 | 2 | 1.15 | 2 | 18 | 11 | 1 | 33 | 0 | 33 | 35 | 513 | 108 | 188 | 100 | 108 | 217 | 140 | 69 | 106 | 7 | 1 | 4 | 61 |
327,076 | codegen-sh/graph-sitter | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/core/detached_symbols/decorator.py | core.detached_symbols.decorator.Decorator | from graph_sitter.core.dataclasses.usage import UsageKind
from graph_sitter.core.expressions.name import Name
from abc import abstractmethod
from graph_sitter.core.autocommit import reader
from graph_sitter.core.interfaces.has_name import HasName
from graph_sitter.core.expressions import Expression
from typing import T... | @apidoc
class Decorator(Expression[TClass | TFunction], HasName, Generic[TClass, TFunction, TParameter]):
'''Abstract representation of a Decorator.'''
def __init__(self, ts_node: TSNode, parent: TClass | TFunction) -> None:
pass
@abstractmethod
@reader
@noapidoc
def _get_name_node(self... | 12 | 3 | 4 | 1 | 2 | 2 | 1 | 0.57 | 3 | 1 | 0 | 2 | 4 | 1 | 4 | 6 | 28 | 6 | 14 | 8 | 3 | 8 | 8 | 6 | 3 | 1 | 1 | 0 | 4 |
327,077 | codegen-sh/graph-sitter | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/core/detached_symbols/function_call.py | core.detached_symbols.function_call.FunctionCall | from graph_sitter.core.dataclasses.usage import UsageKind
from graph_sitter.core.interfaces.resolvable import Resolvable
from graph_sitter.core.detached_symbols.argument import Argument
from graph_sitter.shared.enums.programming_language import ProgrammingLanguage
from graph_sitter.utils import find_first_ancestor
from... | @apidoc
class FunctionCall(Expression[Parent], HasName, Resolvable, Generic[Parent]):
'''Abstract representation of a function invocation, e.g. in Python:
```
def f():
g() # FunctionCall
```
'''
def __init__(self, node: TSNode, file_node_id: NodeId, ctx: CodebaseContext, parent: Parent... | 84 | 22 | 19 | 3 | 10 | 6 | 4 | 0.59 | 4 | 27 | 17 | 0 | 30 | 8 | 31 | 45 | 679 | 118 | 357 | 136 | 265 | 209 | 289 | 91 | 248 | 23 | 3 | 9 | 139 |
327,078 | codegen-sh/graph-sitter | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/core/detached_symbols/parameter.py | core.detached_symbols.parameter.Parameter | from graph_sitter.shared.decorators.docs import apidoc, noapidoc
from abc import abstractmethod
from graph_sitter.core.dataclasses.usage import UsageType
from graph_sitter.core.interfaces.usable import Usable
from typing_extensions import deprecated
from graph_sitter.compiled.autocommit import commiter
from graph_sitte... | @apidoc
class Parameter(Usable[Parent], Typeable[TType, Parent], HasValue, Expression[Parent], Generic[TType, Parent]):
'''Abstract representation of a parameter in a Function definition.'''
def __init__(self, ts_node: TSNode, index: int, parent: Parent) -> None:
pass
@reader
def _get_name_node... | 37 | 8 | 12 | 2 | 5 | 5 | 2 | 0.64 | 5 | 8 | 1 | 2 | 13 | 1 | 13 | 25 | 192 | 35 | 96 | 44 | 60 | 61 | 73 | 31 | 59 | 4 | 3 | 2 | 29 |
327,079 | codegen-sh/graph-sitter | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/core/directory.py | core.directory.Directory | from graph_sitter.core.utils.cache_utils import cached_generator
from collections.abc import Iterator
from graph_sitter.shared.decorators.docs import apidoc, noapidoc
from typing import TYPE_CHECKING, Generic, Literal, Self
from graph_sitter._proxy import proxy_property
from graph_sitter.core.interfaces.has_symbols imp... | @apidoc
class Directory(HasSymbols[TFile, TSymbol, TImportStatement, TGlobalVar, TClass, TFunction, TImport], Generic[TFile, TSymbol, TImportStatement, TGlobalVar, TClass, TFunction, TImport]):
'''Directory representation for codebase.
GraphSitter abstraction of a file directory that can be used to look for fil... | 35 | 18 | 8 | 1 | 5 | 3 | 2 | 0.57 | 2 | 8 | 2 | 0 | 23 | 0 | 23 | 40 | 238 | 49 | 123 | 53 | 85 | 70 | 105 | 41 | 80 | 9 | 2 | 3 | 50 |
327,080 | codegen-sh/graph-sitter | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/core/export.py | core.export.Export | from graph_sitter.compiled.autocommit import commiter
from abc import abstractmethod
from graph_sitter.core.interfaces.exportable import Exportable
from typing import TYPE_CHECKING, Generic, Self, TypeVar
from graph_sitter.shared.decorators.docs import apidoc, noapidoc
@apidoc
class Export(Exportable[Parent], Generic[... | @apidoc
class Export(Exportable[Parent], Generic[Parent]):
'''Represents a single symbol being exported.
Attributes:
export_statement: The statement representing the export.
'''
def __init__(self, ts_node: TSNode, file_node_id: NodeId, ctx: CodebaseContext, parent: Parent) -> None:
pass... | 23 | 8 | 6 | 1 | 2 | 3 | 1 | 0.91 | 2 | 4 | 1 | 0 | 9 | 1 | 9 | 16 | 83 | 20 | 33 | 19 | 10 | 30 | 21 | 12 | 10 | 3 | 2 | 1 | 11 |
327,081 | codegen-sh/graph-sitter | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/core/expressions/await_expression.py | core.expressions.await_expression.AwaitExpression | from graph_sitter.compiled.autocommit import reader
from graph_sitter.core.expressions import Expression
from graph_sitter.core.interfaces.wrapper_expression import IWrapper
from graph_sitter.core.detached_symbols.function_call import FunctionCall
from graph_sitter.shared.decorators.docs import apidoc
from graph_sitter... | @apidoc
class AwaitExpression(Expression[Parent], HasValue, IWrapper, Generic[Parent]):
'''An awaited expression, only found in asynchronous contexts, e.g. await(foo(bar))'''
def __init__(self, ts_node, file_node_id, ctx, parent: Parent):
pass
@property
@reader
def function_calls(self) -> l... | 6 | 2 | 6 | 1 | 3 | 2 | 2 | 0.56 | 4 | 3 | 1 | 0 | 2 | 1 | 2 | 16 | 17 | 3 | 9 | 6 | 4 | 5 | 7 | 5 | 4 | 2 | 3 | 0 | 3 |
327,082 | codegen-sh/graph-sitter | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/core/expressions/binary_expression.py | core.expressions.binary_expression.BinaryExpression | from graph_sitter.shared.decorators.docs import apidoc, noapidoc
from graph_sitter.core.interfaces.has_name import HasName
from graph_sitter.core.interfaces.editable import Editable
from graph_sitter.core.expressions import Expression
from collections import deque
from graph_sitter.codebase.resolution_stack import Reso... | @apidoc
class BinaryExpression(Expression[Parent], Chainable, Generic[Parent]):
'''Represents binary expressions, e.g. all of +,-,*,/, as well as boolean operations (and, or) etc.
Attributes:
left: The left operand of the binary expression.
right: The right operand of the binary expression.
... | 22 | 5 | 10 | 1 | 6 | 3 | 2 | 0.47 | 3 | 11 | 6 | 1 | 8 | 2 | 8 | 15 | 108 | 18 | 62 | 27 | 41 | 29 | 47 | 19 | 38 | 6 | 2 | 2 | 18 |
327,083 | codegen-sh/graph-sitter | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/core/expressions/boolean.py | core.expressions.boolean.Boolean | from graph_sitter.shared.decorators.docs import apidoc, noapidoc
from typing import Generic, TypeVar, override
from graph_sitter.core.interfaces.has_name import HasName
from graph_sitter.core.expressions.builtin import Builtin
from graph_sitter.core.expressions import Expression
from graph_sitter.core.dataclasses.usage... | @apidoc
class Boolean(Expression[Parent], Builtin, Generic[Parent]):
'''A boolean value eg.
True, False
'''
def __bool__(self):
pass
@noapidoc
@commiter
@override
def _compute_dependencies(self, usage_type: UsageKind, dest: HasName | None=None) -> None:
pass
@propert... | 9 | 1 | 2 | 0 | 2 | 0 | 1 | 0.27 | 3 | 3 | 2 | 0 | 3 | 0 | 3 | 13 | 18 | 4 | 11 | 6 | 3 | 3 | 7 | 4 | 3 | 1 | 3 | 0 | 3 |
327,084 | codegen-sh/graph-sitter | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/core/expressions/builtin.py | core.expressions.builtin.Builtin | from graph_sitter.core.interfaces.chainable import Chainable
from typing import TYPE_CHECKING, Self, override
from graph_sitter.compiled.autocommit import reader
from collections.abc import Generator
from graph_sitter.core.interfaces.has_attribute import HasAttribute
from graph_sitter.codebase.resolution_stack import R... | @noapidoc
class Builtin(Chainable, HasAttribute):
@reader
@noapidoc
@override
def _resolved_types(self) -> Generator[ResolutionStack[Self], None, None]:
pass
@noapidoc
@override
def resolve_attribute(self, name: str) -> 'ExternalModule | None':
pass | 9 | 0 | 3 | 0 | 2 | 1 | 1 | 0.2 | 2 | 2 | 0 | 7 | 2 | 0 | 2 | 10 | 13 | 1 | 10 | 5 | 2 | 2 | 5 | 3 | 2 | 1 | 2 | 0 | 2 |
327,085 | codegen-sh/graph-sitter | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/core/expressions/chained_attribute.py | core.expressions.chained_attribute.ChainedAttribute | from tree_sitter import Node as TSNode
from graph_sitter.codebase.resolution_stack import ResolutionStack
from graph_sitter.core.interfaces.chainable import Chainable
from graph_sitter.shared.decorators.docs import apidoc, noapidoc
from graph_sitter.core.dataclasses.usage import UsageKind
from graph_sitter.compiled.aut... | @apidoc
class ChainedAttribute(Expression[Parent], Resolvable, Generic[Object, Attribute, Parent]):
'''An attribute of an object. (IE a method on a class, a function from a module, etc)
Examples:
A.method()
'''
def __init__(self, ts_node, file_node_id, ctx, parent: Parent, object: TSNode, attribut... | 27 | 5 | 13 | 2 | 8 | 3 | 3 | 0.33 | 3 | 8 | 2 | 2 | 9 | 0 | 9 | 18 | 154 | 30 | 93 | 30 | 66 | 31 | 74 | 20 | 63 | 8 | 3 | 4 | 30 |
327,086 | codegen-sh/graph-sitter | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/core/expressions/comparison_expression.py | core.expressions.comparison_expression.ComparisonExpression | from graph_sitter.core.expressions import Expression
from graph_sitter.core.symbol_groups.expression_group import ExpressionGroup
from functools import cached_property
from graph_sitter.core.expressions.binary_expression import BinaryExpression
from typing import Self, TypeVar
from graph_sitter.shared.decorators.docs i... | @apidoc
class ComparisonExpression(BinaryExpression):
'''Any comparison expression in the code.
Includes all set of `<`, `<=`, `>`, `>=`, `==`, `!=` etc.
'''
def __init__(self, ts_node, file_node_id, ctx, parent: Parent) -> None:
pass
@property
def operators(self) -> list[ExpressionGrou... | 7 | 3 | 12 | 1 | 6 | 5 | 2 | 0.86 | 1 | 4 | 1 | 0 | 3 | 4 | 3 | 18 | 47 | 8 | 21 | 13 | 15 | 18 | 18 | 11 | 14 | 4 | 3 | 2 | 6 |
327,087 | codegen-sh/graph-sitter | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/core/expressions/defined_name.py | core.expressions.defined_name.DefinedName | from graph_sitter.codebase.resolution_stack import ResolutionStack
from graph_sitter.core.expressions import Name
from typing import TYPE_CHECKING, Generic, Self, TypeVar, override
from graph_sitter.shared.decorators.docs import noapidoc
from collections.abc import Generator
from graph_sitter.compiled.autocommit import... |
class DefinedName(Name[Parent], Generic[Parent]):
'''A name that defines a symbol.
Does not reference any other names
'''
@reader
@noapidoc
@override
def _resolved_types(self) -> Generator[ResolutionStack[Self], None, None]:
pass | 5 | 1 | 2 | 0 | 2 | 0 | 1 | 0.5 | 2 | 1 | 0 | 0 | 1 | 0 | 1 | 3 | 11 | 2 | 6 | 3 | 1 | 3 | 3 | 2 | 1 | 1 | 1 | 0 | 1 |
327,088 | codegen-sh/graph-sitter | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/core/expressions/expression.py | core.expressions.expression.Expression | from graph_sitter.enums import NodeType
from graph_sitter.compiled.autocommit import reader
from graph_sitter.core.interfaces.chainable import Chainable
from typing import Generic, TypeVar
from graph_sitter.core.interfaces.editable import Editable
from graph_sitter.shared.decorators.docs import apidoc
@apidoc
class Ex... | @apidoc
class Expression(Editable[Parent], Generic[Parent]):
'''Represents an arbitrary Expression, such as List, Dict, Binary Expression, String.
Attributes:
node_type: The type of the node, set to NodeType.EXPRESSION.
'''
@property
@reader
def resolved_value(self) -> Expression | list[... | 5 | 2 | 14 | 2 | 6 | 6 | 3 | 1 | 2 | 2 | 1 | 11 | 1 | 0 | 1 | 3 | 25 | 5 | 10 | 5 | 6 | 10 | 8 | 3 | 6 | 3 | 1 | 2 | 3 |
327,089 | codegen-sh/graph-sitter | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/core/expressions/generic_type.py | core.expressions.generic_type.GenericType | from graph_sitter.compiled.resolution import ResolutionStack
from graph_sitter.core.expressions.named_type import NamedType
from abc import abstractmethod
from graph_sitter.core.node_id_factory import NodeId
from graph_sitter.core.interfaces.importable import Importable
from graph_sitter.core.dataclasses.usage import U... | @apidoc
class GenericType(NamedType[Parent], Generic[TType, Parent]):
'''Abstract representation of the generic types of the programming language.'''
def __init__(self, ts_node: TSNode, file_node_id: NodeId, ctx: 'CodebaseContext', parent: Parent):
pass
@property
@reader
def parameters(self... | 18 | 3 | 5 | 0 | 3 | 1 | 2 | 0.26 | 2 | 5 | 2 | 2 | 6 | 0 | 6 | 46 | 48 | 9 | 31 | 16 | 14 | 8 | 21 | 10 | 14 | 2 | 6 | 1 | 9 |
327,090 | codegen-sh/graph-sitter | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/core/expressions/multi_expression.py | core.expressions.multi_expression.MultiExpression | from typing import TYPE_CHECKING, Generic, TypeVar, override
from graph_sitter.core.expressions import Expression
from graph_sitter.shared.decorators.docs import apidoc, noapidoc
from graph_sitter.compiled.autocommit import commiter
@apidoc
class MultiExpression(Expression[Parent], Generic[Parent, TExpression]):
"... | @apidoc
class MultiExpression(Expression[Parent], Generic[Parent, TExpression]):
'''Represents an group of Expressions, such as List, Dict, Binary Expression, String.
Attributes:
expressions: A list of expressions contained within the MultiExpression.
'''
def __init__(self, ts_node: TSNode, fil... | 7 | 1 | 3 | 0 | 3 | 0 | 2 | 0.36 | 2 | 2 | 0 | 0 | 2 | 1 | 2 | 4 | 19 | 4 | 11 | 6 | 5 | 4 | 8 | 5 | 5 | 2 | 1 | 1 | 3 |
327,091 | codegen-sh/graph-sitter | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/core/expressions/name.py | core.expressions.name.Name | from typing import TYPE_CHECKING, Generic, Optional, Self, TypeVar, override
from graph_sitter.core.interfaces.resolvable import Resolvable
from graph_sitter.compiled.autocommit import commiter
from graph_sitter.core.autocommit import reader, writer
from collections.abc import Generator
from graph_sitter.codebase.resol... | @apidoc
class Name(Expression[Parent], Resolvable, Generic[Parent]):
'''Editable attribute on any given code objects that has a name.
For example, function, classes, global variable, interfaces, attributes, parameters are all
composed of a name.
'''
@reader
@noapidoc
@override
def _resol... | 17 | 4 | 15 | 1 | 10 | 4 | 4 | 0.45 | 3 | 8 | 1 | 0 | 5 | 1 | 5 | 14 | 101 | 14 | 60 | 22 | 44 | 27 | 49 | 14 | 42 | 8 | 3 | 2 | 22 |
327,092 | codegen-sh/graph-sitter | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/core/expressions/named_type.py | core.expressions.named_type.NamedType | from graph_sitter.core.interfaces.resolvable import Resolvable
from typing import TYPE_CHECKING, Generic, Self, TypeVar, override
from abc import abstractmethod
from graph_sitter.codebase.resolution_stack import ResolutionStack
from graph_sitter.shared.decorators.docs import apidoc, noapidoc
from graph_sitter.core.inte... | @apidoc
class NamedType(Resolvable, Type[Parent], HasName, Generic[Parent]):
'''An abstract representation of a named type.'''
def __init__(self, ts_node: TSNode, file_node_id: NodeId, ctx: 'CodebaseContext', parent: Parent):
pass
def __eq__(self, other: object) -> bool:
pass
def __ha... | 20 | 2 | 4 | 0 | 3 | 0 | 2 | 0.11 | 4 | 8 | 2 | 3 | 8 | 1 | 8 | 40 | 50 | 9 | 37 | 18 | 17 | 4 | 27 | 12 | 17 | 4 | 5 | 3 | 13 |
327,093 | codegen-sh/graph-sitter | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/core/expressions/none_type.py | core.expressions.none_type.NoneType | from graph_sitter.core.interfaces.importable import Importable
from graph_sitter.compiled.autocommit import reader
from typing import TYPE_CHECKING, Generic, Self, TypeVar, override
from graph_sitter.core.dataclasses.usage import UsageKind
from graph_sitter.codebase.resolution_stack import ResolutionStack
from graph_si... | @apidoc
class NoneType(Type[Parent], Generic[Parent]):
'''Represents a None or Null object.'''
@noapidoc
def _compute_dependencies(self, usage_type: UsageKind, dest: Importable):
pass
@reader
@noapidoc
@override
def _resolved_types(self) -> Generator[ResolutionStack[Self], None, None... | 8 | 1 | 2 | 0 | 2 | 0 | 1 | 0.11 | 2 | 3 | 2 | 0 | 2 | 0 | 2 | 33 | 12 | 2 | 9 | 5 | 2 | 1 | 5 | 3 | 2 | 1 | 5 | 0 | 2 |
327,094 | codegen-sh/graph-sitter | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/core/expressions/number.py | core.expressions.number.Number | from typing import Generic, TypeVar, override
from graph_sitter.compiled.autocommit import commiter
from graph_sitter.core.dataclasses.usage import UsageKind
from graph_sitter.core.interfaces.has_name import HasName
from graph_sitter.core.expressions.builtin import Builtin
from graph_sitter.shared.decorators.docs impor... | @apidoc
class Number(Expression[Parent], Builtin, Generic[Parent]):
'''A number value.
eg. 1, 2.0, 3.14
'''
@noapidoc
@commiter
@override
def _compute_dependencies(self, usage_type: UsageKind, dest: HasName | None=None) -> None:
pass
@property
def __class__(self):
pas... | 8 | 1 | 2 | 0 | 2 | 0 | 1 | 0.33 | 3 | 3 | 2 | 0 | 2 | 0 | 2 | 12 | 15 | 3 | 9 | 5 | 2 | 3 | 5 | 3 | 2 | 1 | 3 | 0 | 2 |
327,095 | codegen-sh/graph-sitter | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/core/expressions/parenthesized_expression.py | core.expressions.parenthesized_expression.ParenthesizedExpression | from graph_sitter.core.interfaces.unwrappable import Unwrappable
from typing import Generic, TypeVar, override
from graph_sitter.core.autocommit import writer
from graph_sitter.codebase.transactions import TransactionPriority
from graph_sitter.core.detached_symbols.function_call import FunctionCall
from graph_sitter.sh... | @apidoc
class ParenthesizedExpression(Unwrappable[Parent], HasValue, IWrapper, Generic[Parent]):
'''An expression surrounded in a set of parenthesis.
Example:
```typescript
(5 + 5)
```
'''
def __init__(self, ts_node, file_node_id, ctx, parent: Parent):
pass
@property... | 11 | 4 | 13 | 2 | 7 | 5 | 3 | 0.76 | 4 | 7 | 4 | 0 | 4 | 1 | 4 | 19 | 70 | 12 | 33 | 11 | 23 | 25 | 23 | 8 | 18 | 7 | 3 | 2 | 11 |
327,096 | codegen-sh/graph-sitter | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/core/expressions/placeholder_type.py | core.expressions.placeholder_type.PlaceholderType | from graph_sitter.core.dataclasses.usage import UsageKind
from graph_sitter.core.autocommit import commiter
from graph_sitter.compiled.autocommit import reader
from collections.abc import Generator
from graph_sitter.core.interfaces.importable import Importable
from graph_sitter.core.expressions.type import Type
from gr... | @apidoc
class PlaceholderType(Type[Parent], Generic[TType, Parent]):
'''Represents a type that has not been implemented yet.'''
@noapidoc
@commiter
def _compute_dependencies(self, usage_type: UsageKind, dest: Importable):
pass
@reader
@noapidoc
@override
def _resolved_types(self)... | 9 | 1 | 2 | 0 | 2 | 0 | 1 | 0.1 | 2 | 2 | 1 | 0 | 2 | 0 | 2 | 33 | 13 | 2 | 10 | 5 | 2 | 1 | 5 | 3 | 2 | 1 | 5 | 0 | 2 |
327,097 | codegen-sh/graph-sitter | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/core/expressions/string.py | core.expressions.string.String | from graph_sitter.core.interfaces.has_name import HasName
from graph_sitter.core.symbol_groups.collection import Collection
from tree_sitter import Node as TSNode
from graph_sitter.core.node_id_factory import NodeId
from graph_sitter.compiled.autocommit import commiter
from graph_sitter.shared.decorators.docs import ap... | @apidoc
class String(Expression[Parent], Builtin, Generic[Parent]):
'''GraphSitter representation of String.
Attributes:
content: The content of the string
content_nodes: A collection of string fragments and escape sequences in TS, or a single string content in Python.
expressions: Embed... | 15 | 2 | 4 | 0 | 3 | 1 | 1 | 0.43 | 3 | 6 | 1 | 0 | 7 | 2 | 7 | 18 | 51 | 10 | 30 | 15 | 16 | 13 | 24 | 10 | 16 | 2 | 3 | 1 | 9 |
327,098 | codegen-sh/graph-sitter | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/core/expressions/subscript_expression.py | core.expressions.subscript_expression.SubscriptExpression | from collections.abc import Generator
from graph_sitter.codebase.resolution_stack import ResolutionStack
from graph_sitter.core.expressions import Name
from graph_sitter.compiled.autocommit import commiter
from graph_sitter.core.autocommit import reader, writer
from graph_sitter.core.dataclasses.usage import UsageKind
... | @apidoc
class SubscriptExpression(Expression[Parent], Resolvable[Parent], Generic[Object, Index, Parent]):
'''Indexing onto an object (Aka using brackets on an object)
Examples:
A[]
Attributes:
object: The object being indexed.
indices: A list of indices used for indexing the object.
... | 13 | 1 | 4 | 0 | 3 | 0 | 2 | 0.35 | 3 | 3 | 0 | 0 | 4 | 1 | 4 | 13 | 39 | 8 | 23 | 10 | 11 | 8 | 16 | 7 | 11 | 2 | 3 | 1 | 6 |
327,099 | codegen-sh/graph-sitter | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/codegen-sh_graph-sitter/src/graph_sitter/core/expressions/ternary_expression.py | core.expressions.ternary_expression.TernaryExpression | from graph_sitter.compiled.autocommit import commiter, reader
from graph_sitter.core.interfaces.importable import Importable
from graph_sitter.shared.decorators.docs import apidoc, noapidoc
from typing import Generic, Self, TypeVar, override
from graph_sitter.core.interfaces.has_name import HasName
from graph_sitter.co... | @apidoc
class TernaryExpression(Expression[Parent], Chainable, Generic[Parent]):
'''Any ternary expression in the code where a condition will determine branched execution.
Attributes:
condition: The condition expression that determines which branch to execute.
consequence: The expression to exec... | 14 | 2 | 9 | 1 | 6 | 2 | 2 | 0.39 | 3 | 9 | 5 | 2 | 4 | 0 | 4 | 11 | 58 | 8 | 36 | 11 | 23 | 14 | 27 | 7 | 22 | 6 | 2 | 1 | 9 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.