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,300
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/canonical/move_functions_to_new_file/move_functions_to_new_file.py
move_functions_to_new_file.MoveFunctionsToNewFile
from graph_sitter.shared.enums.programming_language import ProgrammingLanguage from graph_sitter.writer_decorators import canonical from codemods.codemod import Codemod from tests.shared.skills.skill import Skill from tests.shared.skills.decorators import skill, skill_impl from graph_sitter.core.codebase import Codebas...
@skill(canonical=True, prompt="Generate a Python codemod that moves all functions starting with 'pylsp_' from existing files in a codebase to a new file named 'pylsp_shared.py'.\nEnsure that all imports across the codebase are updated to reflect the new location of these functions. The codemod should iterate through ea...
5
1
9
0
6
3
4
0.67
2
2
2
0
1
0
1
32
18
3
9
7
6
6
8
6
6
4
5
3
4
327,301
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/named_type.py
named_type.PyNamedType
from tree_sitter import Node as TSNode from typing import Generic, TypeVar from graph_sitter.shared.decorators.docs import py_apidoc from graph_sitter.core.expressions.named_type import NamedType @py_apidoc class PyNamedType(NamedType[Parent], Generic[Parent]): """Named python type Examples: int,str (...
@py_apidoc class PyNamedType(NamedType[Parent], Generic[Parent]): '''Named python type Examples: int,str (builtin types) Path (classes) ''' def _get_name_node(self) -> TSNode | None: pass
3
1
2
0
2
0
1
1.67
2
0
0
1
1
0
1
41
10
2
3
2
1
5
3
2
1
1
6
0
1
327,302
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/named_type.py
named_type.TSNamedType
from graph_sitter.core.expressions.named_type import NamedType from tree_sitter import Node as TSNode from graph_sitter.shared.decorators.docs import ts_apidoc @ts_apidoc class TSNamedType(NamedType[Parent]): """Named type Examples: string """ def _get_name_node(self) -> TSNode | None: ...
@ts_apidoc class TSNamedType(NamedType[Parent]): '''Named type Examples: string ''' def _get_name_node(self) -> TSNode | None: pass
3
1
2
0
2
0
1
1.33
1
0
0
2
1
0
1
41
8
1
3
2
1
4
3
2
1
1
6
0
1
327,303
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/object_type.py
object_type.TSObjectPair
from typing import TYPE_CHECKING, Generic, Self, TypeVar from graph_sitter.typescript.symbol_groups.dict import TSDict, TSPair from graph_sitter.core.expressions.expression import Expression from graph_sitter.core.expressions.value import Value from graph_sitter.core.expressions.type import Type class TSObjectPair(TSP...
class TSObjectPair(TSPair, Generic[Parent]): '''Object type Examples: a: {a: int; b?(a: int): c} ''' def _get_key_value(self) -> tuple[Expression[Self] | None, Expression[Self] | None]: pass
2
1
28
2
25
1
8
0.19
2
6
4
0
1
0
1
12
35
4
26
5
23
5
20
5
17
8
3
1
8
327,304
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/object_type.py
object_type.TSObjectType
from tree_sitter import Node as TSNode from graph_sitter.typescript.symbol_groups.dict import TSDict, TSPair from graph_sitter.core.interfaces.importable import Importable from graph_sitter.core.dataclasses.usage import UsageKind from typing import TYPE_CHECKING, Generic, Self, TypeVar from graph_sitter.core.node_id_fa...
@ts_apidoc class TSObjectType(TSDict, Type[Parent], Generic[Parent]): '''A class representing a TypeScript object type with type annotations and dependencies. A specialized class extending `TSDict` and implementing `Type` for handling TypeScript object type annotations. This class handles object type defini...
4
1
3
0
3
0
2
0.86
3
3
2
0
2
0
2
73
16
3
7
4
4
6
7
4
4
3
9
2
4
327,305
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/canonical/openapi_add_response_none/openapi_add_response_none.py
openapi_add_response_none.OpenAPIAddResponseNone
from graph_sitter.shared.enums.programming_language import ProgrammingLanguage from graph_sitter.core.detached_symbols.decorator import Decorator from graph_sitter.core.symbol import Symbol from tests.shared.skills.decorators import skill, skill_impl from tests.shared.skills.skill import Skill from graph_sitter.core.co...
@skill(canonical=True, prompt="Generate a Python codemod that adds a `@xys_ns.response(200)` decorator to Flask Resource methods that lack return status codes. The codemod should\ncheck for Flask Resource classes and their HTTP methods (GET, POST, PUT, PATCH, DELETE). If a method does not have any `@response` decorator...
7
3
13
1
9
4
4
1.09
2
4
3
0
1
0
1
32
56
10
22
12
17
24
21
11
17
8
5
7
11
327,306
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/canonical/openapi_no_reference_request/openapi_no_reference_request.py
openapi_no_reference_request.OpenAPINoReferenceRequest
from tests.shared.skills.decorators import skill, skill_impl from graph_sitter.shared.enums.programming_language import ProgrammingLanguage from graph_sitter.core.symbol import Symbol from graph_sitter.core.codebase import Codebase from codemods.codemod import Codemod from graph_sitter.writer_decorators import canonica...
@skill(canonical=True, prompt="Generate a Python codemod that adds `@my_namespace.expect(None)` to all Flask route methods (GET, POST, PUT, PATCH, DELETE) in classes ending with\n'Resource' that do not access the request object. Ensure that these methods do not already have an `expect` decorator or similar decorators l...
6
1
15
1
12
2
5
0.24
2
3
3
0
1
0
1
32
30
4
21
12
17
5
20
11
17
8
5
7
10
327,307
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/examples/examples/sqlalchemy_type_annotations/input_repo/models/organization.py
organization.Organization
from .base import Base from sqlalchemy import Column, Integer, String, DateTime from sqlalchemy.orm import relationship class Organization(Base): __tablename__ = 'organizations' id = Column(Integer, primary_key=True) name = Column(String(200)) xero_organization_id = Column(String(50), unique=True) ...
class Organization(Base): pass
1
0
0
0
0
0
0
0.11
1
0
0
0
0
0
0
0
12
2
9
8
8
1
9
8
8
0
1
0
0
327,308
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/detached_symbols/parameter.py
parameter.PyParameter
from graph_sitter.shared.decorators.docs import py_apidoc from graph_sitter.core.symbol_groups.collection import Collection from graph_sitter.core.autocommit import reader, writer from graph_sitter.python.expressions.type import PyType from typing_extensions import deprecated from graph_sitter.core.detached_symbols.par...
@py_apidoc class PyParameter(Parameter[PyType, Collection['PyParameter', 'PyFunction']]): '''Extends Parameter for Python codebases.''' @property @reader def is_optional(self) -> bool: '''Determines if the parameter is optional in Python code. A parameter is considered optional if it has...
13
5
12
3
3
7
1
1.67
1
2
0
0
4
0
4
29
62
15
18
9
6
30
9
5
4
1
4
0
4
327,309
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/output/placeholder.py
placeholder.Placeholder
from graph_sitter.codebase.span import Span from pydantic.config import ConfigDict from pydantic import BaseModel class Placeholder(BaseModel): model_config = ConfigDict(frozen=True) preview: str span: Span kind_id: int name: str
class Placeholder(BaseModel): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
82
6
0
6
2
5
0
6
2
5
0
5
0
0
327,310
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/placeholder/placeholder_return_type.py
placeholder_return_type.PyReturnTypePlaceholder
from graph_sitter.core.placeholder.placeholder import Placeholder from graph_sitter.shared.decorators.docs import py_apidoc from typing import TYPE_CHECKING, Generic, TypeVar @py_apidoc class PyReturnTypePlaceholder(Placeholder[Parent], Generic[Parent]): """A placeholder for a python return type that does not exis...
@py_apidoc class PyReturnTypePlaceholder(Placeholder[Parent], Generic[Parent]): '''A placeholder for a python return type that does not exist. Can be populated using the `edit` method. ''' def edit(self, new_src: str, fix_indentation: bool=False, priority: int=0, dedupe: bool=True) -> None: '''...
3
2
21
3
6
13
2
2.29
2
3
0
0
1
0
1
29
26
4
7
4
5
16
7
4
5
2
5
1
2
327,311
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/placeholder/placeholder_return_type.py
placeholder_return_type.TSReturnTypePlaceholder
from graph_sitter.core.placeholder.placeholder import Placeholder from graph_sitter.shared.decorators.docs import ts_apidoc from typing import TYPE_CHECKING, Generic, TypeVar @ts_apidoc class TSReturnTypePlaceholder(Placeholder[Parent], Generic[Parent]): """A placeholder class for function return type annotations ...
@ts_apidoc class TSReturnTypePlaceholder(Placeholder[Parent], Generic[Parent]): '''A placeholder class for function return type annotations in TypeScript. This class represents a placeholder for function return type annotations, allowing for modification and addition of return type annotations after the par...
3
2
24
5
7
12
3
2.13
2
3
0
0
1
0
1
29
32
7
8
3
6
17
8
3
6
3
5
1
3
327,312
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/pr_options.py
pr_options.PROptions
from pydantic import BaseModel from graph_sitter.shared.decorators.docs import apidoc @apidoc class PROptions(BaseModel): """Options for generating a PR. Attributes: title: The title of the pull request. body: The body content of the pull request. labels: A list of labels to be added t...
@apidoc class PROptions(BaseModel): '''Options for generating a PR. Attributes: title: The title of the pull request. body: The body content of the pull request. labels: A list of labels to be added to the pull request. force_push_head_branch: Whether to force push the head branc...
2
1
0
0
0
0
0
1.6
1
0
0
0
0
0
0
82
14
2
5
5
4
8
5
5
4
0
5
0
0
327,313
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/pr_part_context.py
pr_part_context.PRPartContext
from pydantic import BaseModel class PRPartContext(BaseModel): """Represents a GitHub pull request part parsed from a webhook payload""" ref: str sha: str @classmethod def from_payload(cls, payload: dict) -> 'PRPartContext': return cls(ref=payload.get('ref'), sha=payload.get('sha'))
class PRPartContext(BaseModel): '''Represents a GitHub pull request part parsed from a webhook payload''' @classmethod def from_payload(cls, payload: dict) -> 'PRPartContext': pass
3
1
2
0
2
0
1
0.17
1
1
0
0
0
0
1
83
9
2
6
3
3
1
5
2
3
1
5
0
1
327,314
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/utils/pr_review.py
pr_review.CodegenPR
from unidiff import PatchSet from graph_sitter.git.repo_operator.repo_operator import RepoOperator from github.PullRequest import PullRequest class CodegenPR: """Wrapper around PRs - enables codemods to interact with them""" _gh_pr: PullRequest _codebase: 'Codebase' _op: RepoOperator _modified_file...
class CodegenPR: '''Wrapper around PRs - enables codemods to interact with them''' def __init__(self, op: RepoOperator, codebase: 'Codebase', pr: PullRequest): pass @property def modified_file_ranges(self) -> dict[str, list[tuple[int, int]]]: '''Files and the ranges within that are mod...
13
6
7
0
5
1
2
0.16
0
11
2
0
9
0
9
9
80
14
57
27
43
9
54
24
43
6
0
3
18
327,315
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/enums/programming_language.py
programming_language.ProgrammingLanguage
from enum import StrEnum class ProgrammingLanguage(StrEnum): TYPESCRIPT = 'TYPESCRIPT' PYTHON = 'PYTHON' OTHER = 'OTHER' UNSUPPORTED = 'UNSUPPORTED'
class ProgrammingLanguage(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,316
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/progress.py
progress.LSPProgress
from lsprotocol.types import ProgressToken from pygls.lsp.server import LanguageServer from graph_sitter.codebase.progress.progress import Progress from lsprotocol import types from graph_sitter.codebase.progress.stub_task import StubTask import uuid class LSPProgress(Progress[LSPTask | StubTask]): initialized = F...
class LSPProgress(Progress[LSPTask | StubTask]): def __init__(self, server: LanguageServer, initial_token: ProgressToken | None=None): pass def begin_with_token(self, message: str, token: ProgressToken | None=None, *, count: int | None=None, create_token: bool=True) -> LSPTask | StubTask: pas...
5
0
5
0
5
0
2
0.05
1
5
2
0
4
2
4
27
25
4
21
9
16
1
21
9
16
2
5
1
8
327,317
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/progress.py
progress.LSPTask
from graph_sitter.codebase.progress.task import Task from pygls.lsp.server import LanguageServer from lsprotocol import types from lsprotocol.types import ProgressToken class LSPTask(Task): count: int | None def __init__(self, server: LanguageServer, message: str, token: ProgressToken, count: int | None=None,...
class LSPTask(Task): def __init__(self, server: LanguageServer, message: str, token: ProgressToken, count: int | None=None, create_token: bool=True) -> None: pass def update(self, message: str, count: int | None=None) -> None: pass def end(self) -> None: pass
4
0
6
0
6
0
2
0
1
3
0
0
3
4
3
25
22
3
19
9
15
0
18
9
14
2
5
1
6
327,318
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/progress/progress.py
progress.Progress
from abc import ABC, abstractmethod from typing import TYPE_CHECKING, Generic, TypeVar class Progress(ABC, Generic[T]): @abstractmethod def begin(self, message: str, count: int | None=None) -> T: pass
class Progress(ABC, Generic[T]): @abstractmethod def begin(self, message: str, count: int | None=None) -> T: pass
3
0
2
0
2
0
1
0
2
2
0
3
1
0
1
23
4
0
4
3
1
0
3
2
1
1
4
0
1
327,319
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/promise_chain.py
promise_chain.TSPromiseChain
from graph_sitter.core.statements.statement import StatementType from graph_sitter.core.expressions import Name from graph_sitter.core.autocommit import reader, writer class TSPromiseChain: """A class representing a TypeScript Promise chain. This class parses and handles Promise chains in TypeScript code, inc...
class TSPromiseChain: '''A class representing a TypeScript Promise chain. This class parses and handles Promise chains in TypeScript code, including .then(), .catch(), and .finally() chains. It provides functionality to convert Promise chains to async/await syntax. ''' def __init__(self, attribute...
42
17
25
4
14
7
5
0.46
0
9
2
0
19
0
19
19
543
102
303
112
258
139
248
94
225
12
0
4
88
327,320
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/jsx/prop.py
prop.JSXProp
from graph_sitter.core.expressions.name import Name from graph_sitter.codebase.codebase_context import CodebaseContext from typing import TYPE_CHECKING, override from graph_sitter.shared.decorators.docs import noapidoc, ts_apidoc from graph_sitter.core.autocommit import reader, writer from graph_sitter.core.dataclasses...
@ts_apidoc class JSXProp(Expression['Function | JSXElement | JSXProp'], HasName, HasValue): '''Abstract representation of TSX/JSX prop, e.g <Component prop="value" />.''' def __init__(self, ts_node: TSNode, file_node_id: NodeId, ctx: CodebaseContext, parent: 'Function | JSXElement | JSXProp') -> None: ...
14
4
15
2
7
7
2
0.82
3
5
1
0
5
1
5
7
94
14
44
26
17
36
21
8
15
3
1
2
8
327,321
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/protocol.py
protocol.GraphSitterLanguageServerProtocol
from graph_sitter.core.codebase import Codebase import os from graph_sitter.extensions.lsp.progress import LSPProgress from graph_sitter.extensions.lsp.utils import get_path from graph_sitter.extensions.lsp.io import LSPIO from lsprotocol.types import INITIALIZE, InitializeParams, InitializeResult from pygls.protocol i...
class GraphSitterLanguageServerProtocol(LanguageServerProtocol): def _init_codebase(self, params: InitializeParams) -> None: pass @lsp_method(INITIALIZE) def lsp_initialize(self, params: InitializeParams) -> InitializeResult: pass
4
0
9
0
9
0
2
0
1
7
4
0
2
0
2
2
23
2
21
9
17
0
18
8
15
3
1
1
4
327,322
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/github/types/events/pull_request.py
pull_request.Label
from pydantic import BaseModel class Label(BaseModel): id: int node_id: str url: str name: str description: str | None = None color: str default: bool
class Label(BaseModel): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
82
8
0
8
2
7
0
8
2
7
0
5
0
0
327,323
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/github/types/events/pull_request.py
pull_request.PullRequestLabeledEvent
from ..pull_request import PullRequest from pydantic import BaseModel from typing import Literal class PullRequestLabeledEvent(BaseModel): """Simplified version of the PR labeled event for testing""" action: Literal['labeled'] number: int pull_request: PullRequest label: Label repository: dict ...
class PullRequestLabeledEvent(BaseModel): '''Simplified version of the PR labeled event for testing''' pass
1
1
0
0
0
0
0
0.29
1
0
0
0
0
0
0
82
9
1
7
1
6
2
7
1
6
0
5
0
0
327,324
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/github/types/events/pull_request.py
pull_request.PullRequestOpenedEvent
from ..installation import GitHubInstallation from ..base import GitHubRepository, GitHubUser from ..enterprise import GitHubEnterprise from ..organization import GitHubOrganization from pydantic import BaseModel from ..pull_request import PullRequest class PullRequestOpenedEvent(BaseModel): action: str = 'opened'...
class PullRequestOpenedEvent(BaseModel): pass
1
0
0
0
0
0
0
0.11
1
0
0
0
0
0
0
82
9
0
9
2
8
1
9
2
8
0
5
0
0
327,325
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/github/types/events/pull_request.py
pull_request.PullRequestUnlabeledEvent
from ..installation import GitHubInstallation from ..enterprise import GitHubEnterprise from ..organization import GitHubOrganization from ..label import GitHubLabel from pydantic import BaseModel from ..base import GitHubRepository, GitHubUser from ..pull_request import PullRequest class PullRequestUnlabeledEvent(Bas...
class PullRequestUnlabeledEvent(BaseModel): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
82
10
0
10
1
9
0
10
1
9
0
5
0
0
327,326
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/github/types/events/pull_request.py
pull_request.SimplePullRequest
from pydantic import BaseModel class SimplePullRequest(BaseModel): id: int number: int state: str locked: bool title: str user: User body: str | None = None labels: list[Label] = [] created_at: str updated_at: str draft: bool = False
class SimplePullRequest(BaseModel): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
82
12
0
12
4
11
0
12
4
11
0
5
0
0
327,327
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/github/types/events/pull_request.py
pull_request.User
from pydantic import BaseModel class User(BaseModel): id: int login: str
class User(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,328
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/pull_request_context.py
pull_request_context.PullRequestContext
from graph_sitter.git.models.github_named_user_context import GithubNamedUserContext from pydantic import BaseModel from graph_sitter.git.models.pr_part_context import PRPartContext class PullRequestContext(BaseModel): """Represents a GitHub pull request""" id: int url: str html_url: str number: in...
class PullRequestContext(BaseModel): '''Represents a GitHub pull request''' @classmethod def from_payload(cls, webhook_payload: dict) -> 'PullRequestContext': pass
3
1
21
0
21
0
1
0.03
1
3
2
0
0
0
1
83
43
2
40
11
37
1
21
10
19
1
5
0
1
327,329
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/github/types/events/push.py
push.PushEvent
from ..pusher import GitHubPusher from pydantic import BaseModel from ..enterprise import GitHubEnterprise from ..base import GitHubRepository, GitHubUser from ..commit import GitHubCommit from ..installation import GitHubInstallation from ..organization import GitHubOrganization class PushEvent(BaseModel): ref: s...
class PushEvent(BaseModel): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
82
17
0
17
3
16
0
17
3
16
0
5
0
0
327,330
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/assignment.py
python.assignment.PyAssignment
from collections.abc import Collection from graph_sitter.python.symbol_groups.comment_group import PyCommentGroup from graph_sitter.python.symbol import PySymbol from graph_sitter.codebase.transactions import RemoveTransaction, TransactionPriority from graph_sitter.compiled.autocommit import reader from graph_sitter.co...
@py_apidoc class PyAssignment(Assignment['PyAssignmentStatement'], PySymbol): '''An abstract representation of a assignment in python. This includes assignments of variables to functions, other variables, class instantiations, etc. ''' @noapidoc @classmethod def from_assignment(cls, ts_node:...
19
5
17
2
8
6
2
0.71
2
12
6
0
5
1
7
73
141
25
68
30
50
48
52
23
44
7
6
4
16
327,331
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/class_definition.py
python.class_definition.PyClass
from graph_sitter.core.autocommit import commiter, reader, writer from typing import Self from graph_sitter.core.dataclasses.usage import UsageKind from graph_sitter.python.detached_symbols.parameter import PyParameter from graph_sitter.python.detached_symbols.decorator import PyDecorator from graph_sitter.core.symbol_...
@py_apidoc class PyClass(Class[PyFunction, PyDecorator, PyCodeBlock, PyParameter, PyType], PyHasBlock, PySymbol): '''Extends Class for Python codebases Attributes: constructor_keyword: The keyword used to identify the constructor method in Python classes. ''' def __init__(self, ts_node:...
13
2
14
1
9
4
4
0.49
3
11
7
0
5
5
5
87
92
13
53
25
41
26
45
20
39
6
6
5
19
327,332
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/file.py
python.file.PyFile
from graph_sitter.python.detached_symbols.code_block import PyCodeBlock from graph_sitter.python.import_resolution import PyImport from graph_sitter.core.file import SourceFile from graph_sitter.python.statements.attribute import PyAttribute from graph_sitter.enums import ImportType from graph_sitter.python.class_defin...
@py_apidoc class PyFile(SourceFile[PyImport, PyFunction, PyClass, PyAssignment, Interface[PyCodeBlock, PyAttribute, PyFunction, PyType], PyCodeBlock], PyHasBlock): '''SourceFile representation for Python codebase Attributes: programming_language: The programming language of the file. Set to ProgrammingL...
23
11
21
3
9
9
4
0.9
2
13
6
0
9
0
10
23
248
48
106
39
84
95
90
26
79
7
3
4
41
327,333
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/function.py
python.function.PyFunction
from graph_sitter.python.detached_symbols.decorator import PyDecorator from graph_sitter.python.expressions.type import PyType from graph_sitter.core.function import Function from graph_sitter.python.interfaces.has_block import PyHasBlock from graph_sitter.python.detached_symbols.parameter import PyParameter from graph...
@py_apidoc class PyFunction(Function[PyDecorator, PyCodeBlock, PyParameter, PyType], PyHasBlock, PySymbol): '''Extends Function for Python codebases.''' def __init__(self, ts_node: TSNode, file_id: NodeId, ctx: CodebaseContext, parent: PyHasBlock, decorated_node: TSNode | None=None) -> None: pass @...
41
11
13
2
6
5
2
0.68
3
14
8
0
14
3
14
58
230
42
112
39
72
76
72
25
57
6
3
4
29
327,334
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/import_resolution.py
python.import_resolution.PyExternalImportResolver
from graph_sitter.core.import_resolution import ExternalImportResolver, Import, ImportResolution class PyExternalImportResolver(ExternalImportResolver): def __init__(self, from_alias: str, to_context: CodebaseContext) -> None: self.from_alias = from_alias self.to_context = to_context def reso...
class PyExternalImportResolver(ExternalImportResolver): def __init__(self, from_alias: str, to_context: CodebaseContext) -> None: pass def resolve(self, imp: PyImport) -> str | None: pass
3
0
4
0
4
0
2
0
1
2
1
0
2
2
2
3
9
1
8
6
5
0
8
6
5
3
1
1
4
327,335
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/import_resolution.py
python.import_resolution.PyImport
from graph_sitter.enums import ImportType, NodeType import sys from graph_sitter.core.autocommit import reader from graph_sitter.shared.decorators.docs import noapidoc, py_apidoc from graph_sitter.core.expressions import Name import os from graph_sitter.core.import_resolution import ExternalImportResolver, Import, Impo...
@py_apidoc class PyImport(Import['PyFile']): '''Extends Import for Python codebases.''' @reader def is_module_import(self) -> bool: '''Determines if the import is a module-level or wildcard import. Checks whether the import is either a module import (e.g. 'import foo') or a wildcard import (...
33
8
27
3
16
8
6
0.43
1
12
6
0
8
1
11
65
330
47
198
68
160
85
154
47
142
30
5
5
67
327,336
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/statements/assignment_statement.py
python.statements.assignment_statement.PyAssignmentStatement
from graph_sitter.python.assignment import PyAssignment from graph_sitter.core.statements.assignment_statement import AssignmentStatement from graph_sitter.compiled.utils import find_all_descendants from graph_sitter.shared.decorators.docs import py_apidoc from graph_sitter.core.expressions.multi_expression import Mult...
@py_apidoc class PyAssignmentStatement(AssignmentStatement['PyCodeBlock', PyAssignment]): '''A class that represents a Python assignment statement in a codebase, such as `x = 1` or `a, b = 1, 2`. This includes potentially multiple Assignments via `statement.assignments`, which represent each assignment of a val...
7
2
14
2
8
4
3
0.58
1
8
5
1
3
2
4
13
67
15
33
16
25
19
30
15
23
4
2
3
11
327,337
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/statements/attribute.py
python.statements.attribute.PyAttribute
from typing import TYPE_CHECKING, Self from graph_sitter.python.statements.assignment_statement import PyAssignmentStatement from tree_sitter import Node as TSNode from graph_sitter.core.autocommit import reader from graph_sitter.core.interfaces.editable import Editable from graph_sitter._proxy import proxy_property fr...
@py_apidoc class PyAttribute(Attribute['PyCodeBlock', 'PyAssignment'], PyAssignmentStatement): '''Python implementation of Attribute detached symbol.''' @reader def _parse_assignment(self, assignment_node: TSNode | None=None) -> PyAssignment: '''Parses the assignment in the expression''' pas...
21
8
10
1
5
4
2
0.51
2
8
4
0
7
0
7
32
93
16
51
28
30
26
39
20
30
6
3
5
17
327,338
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/statements/block_statement.py
python.statements.block_statement.PyBlockStatement
from graph_sitter.core.statements.block_statement import BlockStatement from graph_sitter.shared.decorators.docs import py_apidoc from graph_sitter.python.interfaces.has_block import PyHasBlock from typing import TYPE_CHECKING, Generic, TypeVar from graph_sitter.compiled.autocommit import reader @py_apidoc class PyBlo...
@py_apidoc class PyBlockStatement(BlockStatement[Parent], PyHasBlock, Generic[Parent]): '''Statement which contains a block.''' @reader def _parse_code_block(self) -> PyCodeBlock | None: pass
4
1
6
0
6
0
3
0.13
3
3
1
4
1
0
1
47
10
1
8
4
5
1
7
3
5
3
5
1
3
327,339
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/statements/break_statement.py
python.statements.break_statement.PyBreakStatement
from typing import TYPE_CHECKING, override from graph_sitter.compiled.autocommit import commiter from graph_sitter.core.statements.statement import Statement, StatementType from graph_sitter.shared.decorators.docs import noapidoc, py_apidoc @py_apidoc class PyBreakStatement(Statement['PyCodeBlock']): """An abstrac...
@py_apidoc class PyBreakStatement(Statement['PyCodeBlock']): '''An abstract representation of a python break statement.''' @noapidoc @commiter @override def _compute_dependencies(self, usage_type: UsageKind, dest: HasName | None=None) -> None: pass
6
1
2
0
2
0
1
0.14
1
2
2
0
1
0
1
11
10
2
7
4
2
1
4
3
2
1
2
0
1
327,340
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/statements/catch_statement.py
python.statements.catch_statement.PyCatchStatement
from graph_sitter.python.statements.block_statement import PyBlockStatement from graph_sitter.core.statements.catch_statement import CatchStatement from graph_sitter.shared.decorators.docs import noapidoc, py_apidoc from graph_sitter.python.detached_symbols.code_block import PyCodeBlock @py_apidoc class PyCatchStateme...
@py_apidoc class PyCatchStatement(CatchStatement[PyCodeBlock], PyBlockStatement): '''Python catch clause. Attributes: code_block: The code block that may trigger an exception condition: The condition which triggers this clause ''' def __init__(self, ts_node: PyNode, file_node_id: NodeId...
6
1
3
0
3
0
1
0.63
2
5
2
0
2
1
2
54
16
3
8
5
3
5
6
4
3
1
6
0
2
327,341
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/statements/comment.py
python.statements.comment.PyComment
from graph_sitter.shared.decorators.docs import noapidoc, py_apidoc from graph_sitter.core.autocommit import commiter, reader from graph_sitter.core.statements.comment import Comment, lowest_indentation @py_apidoc class PyComment(Comment): """Abstract representation of python comments""" @property @reader...
@py_apidoc class PyComment(Comment): '''Abstract representation of python comments''' @property @reader def comment_type(self) -> PyCommentType: '''Determines the type of Python comment based on its syntax. Parses the comment and determines its type based on the leading characters. ...
18
7
20
2
10
9
4
0.81
1
3
1
0
4
0
6
16
135
17
68
20
51
55
48
14
41
8
2
2
26
327,342
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/statements/comment.py
python.statements.comment.PyCommentType
from enum import StrEnum from graph_sitter.shared.decorators.docs import noapidoc, py_apidoc @py_apidoc class PyCommentType(StrEnum): """Enum representing different types of comments. Attributes: SINGLE_LINE: Represents a single line comment. MULTI_LINE_QUOTE: Represents a multi-line comment u...
@py_apidoc class PyCommentType(StrEnum): '''Enum representing different types of comments. Attributes: SINGLE_LINE: Represents a single line comment. MULTI_LINE_QUOTE: Represents a multi-line comment using single quotes. MULTI_LINE_DOUBLE_QUOTE: Represents a multi-line comment using doub...
2
1
0
0
0
0
0
1.4
1
0
0
0
0
0
0
68
14
2
5
5
4
7
5
5
4
0
3
0
0
327,343
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/statements/for_loop_statement.py
python.statements.for_loop_statement.PyForLoopStatement
from graph_sitter.python.statements.block_statement import PyBlockStatement from graph_sitter.compiled.autocommit import commiter, reader from graph_sitter.core.statements.for_loop_statement import ForLoopStatement from graph_sitter.shared.decorators.docs import noapidoc, py_apidoc @py_apidoc class PyForLoopStatement(...
@py_apidoc class PyForLoopStatement(ForLoopStatement['PyCodeBlock'], PyBlockStatement): '''Abstract representation of the for loop in Python Attributes: item: An item in the iterable object iterable: The iterable that is being iterated over ''' def __init__(self, ts_node: TSNode, file_n...
12
2
7
1
5
2
1
0.48
2
9
6
0
4
0
4
52
48
8
27
10
16
13
21
7
16
1
6
0
4
327,344
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/statements/if_block_statement.py
python.statements.if_block_statement.PyIfBlockStatement
from graph_sitter.core.statements.if_block_statement import IfBlockStatement from typing import TYPE_CHECKING, Generic, TypeVar from graph_sitter.core.statements.statement import StatementType from graph_sitter.core.autocommit import reader, writer from graph_sitter.shared.decorators.docs import apidoc @apidoc class P...
@apidoc class PyIfBlockStatement(IfBlockStatement[Parent, 'PyIfBlockStatement'], Generic[Parent]): '''Pythons implementation of the if/elif/else statement block. For example, if there is a code block like: if condition1: block1 elif condition2: block2 else: block3 This cl...
18
5
8
1
4
3
2
0.77
2
6
2
0
7
8
7
26
86
17
39
24
21
30
30
18
21
3
2
2
12
327,345
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/statements/import_statement.py
python.statements.import_statement.PyImportStatement
from graph_sitter.python.import_resolution import PyImport from graph_sitter.python.detached_symbols.code_block import PyCodeBlock from graph_sitter.core.statements.import_statement import ImportStatement from graph_sitter.core.symbol_groups.collection import Collection from graph_sitter.shared.decorators.docs import p...
@py_apidoc class PyImportStatement(ImportStatement['PyFile', PyImport, PyCodeBlock]): '''An abstract representation of a python import statement.''' def __init__(self, ts_node: TSNode, file_node_id: NodeId, ctx: CodebaseContext, parent: PyCodeBlock, pos: int) -> None: pass
3
1
12
0
12
0
5
0.08
1
6
4
0
1
1
1
6
15
1
13
5
11
1
11
5
9
5
2
1
5
327,346
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/statements/match_statement.py
python.statements.match_statement.PyMatchStatement
from graph_sitter.core.statements.switch_statement import SwitchStatement from graph_sitter.shared.decorators.docs import py_apidoc from graph_sitter.python.statements.match_case import PyMatchCase @py_apidoc class PyMatchStatement(SwitchStatement['PyCodeBlock', 'PyCodeBlock', PyMatchCase]): """Abstract representa...
@py_apidoc class PyMatchStatement(SwitchStatement['PyCodeBlock', 'PyCodeBlock', PyMatchCase]): '''Abstract representation of the match block''' def __init__(self, ts_node: PyNode, file_node_id: NodeId, ctx: CodebaseContext, parent: PyCodeBlock, pos: int | None=None) -> None: pass
3
1
7
0
7
0
2
0.13
1
5
3
0
1
2
1
15
10
1
8
6
6
1
8
6
6
2
3
1
2
327,347
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/statements/pass_statement.py
python.statements.pass_statement.PyPassStatement
from typing import TYPE_CHECKING, override from graph_sitter.compiled.autocommit import commiter from graph_sitter.shared.decorators.docs import noapidoc, py_apidoc from graph_sitter.core.statements.statement import Statement, StatementType @py_apidoc class PyPassStatement(Statement['PyCodeBlock']): """An abstract...
@py_apidoc class PyPassStatement(Statement['PyCodeBlock']): '''An abstract representation of a python pass statement.''' @noapidoc @commiter @override def _compute_dependencies(self, usage_type: UsageKind, dest: HasName | None=None) -> None: pass
6
1
2
0
2
0
1
0.14
1
2
2
0
1
0
1
11
10
2
7
4
2
1
4
3
2
1
2
0
1
327,348
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/statements/try_catch_statement.py
python.statements.try_catch_statement.PyTryCatchStatement
from graph_sitter.shared.decorators.docs import noapidoc, py_apidoc from graph_sitter.core.statements.try_catch_statement import TryCatchStatement from graph_sitter.python.statements.block_statement import PyBlockStatement from typing import TYPE_CHECKING, Self, override from graph_sitter.python.statements.catch_statem...
@py_apidoc class PyTryCatchStatement(TryCatchStatement['PyCodeBlock'], PyBlockStatement): '''Abstract representation of the try/catch/finally block in Python. Attributes: except_clauses: The exception handlers. ''' def __init__(self, ts_node: PyNode, file_node_id: NodeId, ctx: CodebaseContext, ...
19
3
9
1
6
2
3
0.36
2
11
7
0
6
1
6
60
80
12
50
21
32
18
38
16
31
4
6
2
18
327,349
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/statements/while_statement.py
python.statements.while_statement.PyWhileStatement
from graph_sitter.python.statements.if_block_statement import PyIfBlockStatement from graph_sitter.shared.decorators.docs import noapidoc, py_apidoc from graph_sitter.python.interfaces.has_block import PyHasBlock from graph_sitter.compiled.autocommit import commiter, reader from graph_sitter.compiled.sort import sort_e...
@py_apidoc class PyWhileStatement(WhileStatement['PyCodeBlock'], PyHasBlock): '''An abstract representation of a python while statement. Attributes: else_statement (PyIfBlockStatement | None): the statement that will run if the while loop completes, if any. ''' def __init__(self, ts_node: TSNod...
15
3
9
1
5
3
2
0.46
2
10
7
0
5
3
5
51
65
11
37
17
23
17
28
11
22
2
5
1
10
327,350
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/statements/with_statement.py
python.statements.with_statement.WithStatement
from graph_sitter.python.interfaces.has_block import PyHasBlock from graph_sitter.shared.decorators.docs import apidoc, noapidoc from functools import cached_property from graph_sitter.compiled.sort import sort_editables from graph_sitter.compiled.autocommit import commiter from graph_sitter.core.statements.statement i...
@apidoc class WithStatement(Statement['PyCodeBlock'], PyHasBlock): '''Pythons implementation of the with statement. Examples: with feature_flag_enabled(...): # code block with open("file.txt") as file: # code block with (context_manager1 as var1, context_manager2 as var2, ...
12
3
8
1
4
3
1
0.92
2
7
4
0
4
2
4
25
63
13
26
13
15
24
20
9
15
1
3
0
4
327,351
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/symbol.py
python.symbol.PySymbol
from graph_sitter.core.symbol import Symbol from graph_sitter.shared.decorators.docs import noapidoc, py_apidoc from graph_sitter.enums import ImportType from graph_sitter.python.statements.comment import PyComment, PyCommentType from graph_sitter.python.symbol_groups.comment_group import PyCommentGroup from typing imp...
@py_apidoc class PySymbol(Symbol['PyHasBlock', 'PyCodeBlock']): '''Extends `Symbol` for Python codebases.''' @classmethod @noapidoc def from_decorated_definition(cls, ts_node: TSNode, file_id: NodeId, ctx: CodebaseContext, parent: HasBlock) -> Symbol: pass @property @reader def is_ex...
24
9
20
3
7
9
3
1.12
1
10
7
2
8
0
9
41
200
37
77
30
48
86
51
15
41
5
5
2
24
327,352
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/query_type.py
query_type.TSQueryType
from typing import TYPE_CHECKING, Generic, Self, TypeVar, override from graph_sitter.shared.decorators.docs import noapidoc, ts_apidoc from graph_sitter.core.interfaces.importable import Importable from graph_sitter.core.node_id_factory import NodeId from graph_sitter.core.dataclasses.usage import UsageKind from graph_...
@ts_apidoc class TSQueryType(Type[Parent], Generic[Parent]): '''Type query Examples: typeof s Attributes: query: The TypeScript type associated with the query. ''' def __init__(self, ts_node: TSNode, file_node_id: NodeId, ctx: 'CodebaseContext', parent: Parent): pass @pr...
11
2
4
1
2
2
1
0.75
2
5
2
0
4
0
4
35
37
9
16
7
6
12
11
5
6
1
5
0
4
327,353
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/readonly_type.py
readonly_type.TSReadonlyType
from collections.abc import Generator from graph_sitter.core.dataclasses.usage import UsageKind from graph_sitter.shared.decorators.docs import noapidoc, ts_apidoc from graph_sitter.core.node_id_factory import NodeId from typing import TYPE_CHECKING, Generic, Self, TypeVar, override from tree_sitter import Node as TSNo...
@ts_apidoc class TSReadonlyType(Type[Parent], Generic[Parent]): '''Readonly type Examples: readonly s Attributes: type: The underlying TypeScript type associated with this readonly type. ''' def __init__(self, ts_node: TSNode, file_node_id: NodeId, ctx: 'CodebaseContext', parent: Parent...
11
2
4
1
2
2
1
0.75
2
5
2
0
4
1
4
35
37
9
16
8
6
12
11
6
6
1
5
0
4
327,354
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/canonical/refactor_react_components_into_separate_files/refactor_react_components_into_separate_files.py
refactor_react_components_into_separate_files.RefactorReactComponentsIntoSeparateFiles
from codemods.codemod import Codemod from graph_sitter.core.codebase import Codebase from graph_sitter.writer_decorators import canonical from graph_sitter.shared.enums.programming_language import ProgrammingLanguage from tests.shared.skills.decorators import skill, skill_impl from tests.shared.skills.skill import Skil...
@skill(canonical=True, prompt='Generate a Python function that refactors React components in a codebase. The function should iterate through all files, identify React function\ncomponents, and separate non-default exported components into new files. Ensure that the new files are named after the components and that all ...
5
1
24
4
13
7
6
0.63
2
1
1
0
1
0
1
32
32
6
16
10
13
10
15
9
13
6
5
4
6
327,355
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/utils/remote_progress.py
remote_progress.CustomRemoteProgress
import time from git import RemoteProgress from graph_sitter.git.schemas.enums import FetchResult class CustomRemoteProgress(RemoteProgress): fetch_result: FetchResult | None = None last_line_time: float | None = None def _parse_progress_line(self, line) -> None: self.line_dropped(line) if...
class CustomRemoteProgress(RemoteProgress): def _parse_progress_line(self, line) -> None: pass def line_dropped(self, line) -> None: pass def update(self, op_code: int, cur_count: str | float, max_count: str | float | None=None, message: str='') -> None: pass
4
0
5
0
5
0
2
0
1
4
1
0
3
0
3
3
22
3
19
12
9
0
13
6
9
2
1
1
5
327,356
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/canonical/remove_indirect_imports/remove_indirect_imports.py
remove_indirect_imports.RemoveIndirectImports
from graph_sitter.core.import_resolution import Import from graph_sitter.writer_decorators import canonical from graph_sitter.core.codebase import Codebase from graph_sitter.core.symbol import Symbol from tests.shared.skills.skill import Skill from codemods.codemod import Codemod from graph_sitter.core.external_module ...
@skill(canonical=True, prompt='Generate a Python function named `execute` within a class `RemoveIndirectImports` that processes a codebase to remove all indirect imports. The\nfunction should iterate through all files in the codebase, check each import to determine if it points to another import, and replace it with a ...
5
1
26
4
12
10
7
0.87
2
4
4
0
1
0
1
32
34
6
15
7
12
13
12
6
10
7
5
4
7
327,357
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/canonical/rename_function_parameters/rename_function_parameters.py
rename_function_parameters.RenameFunctionParameters
from codemods.codemod import Codemod from graph_sitter.core.codebase import Codebase from graph_sitter.shared.enums.programming_language import ProgrammingLanguage from graph_sitter.writer_decorators import canonical from tests.shared.skills.decorators import skill, skill_impl from tests.shared.skills.skill import Skil...
@skill(canonical=True, prompt="Generate a Python codemod that iterates through all files in a codebase, identifies function parameters containing the substring 'obj', and renames\nthem to 'new_obj'. The codemod should be structured as a class that inherits from Codemod and Skill, with an execute method that performs th...
5
1
11
0
8
3
5
0.36
2
1
1
0
1
0
1
32
17
2
11
9
8
4
10
8
8
5
5
4
5
327,358
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/canonical/rename_local_variables/rename_local_variables.py
rename_local_variables.RenameLocalVariables
from tests.shared.skills.skill import Skill from graph_sitter.writer_decorators import canonical from codemods.codemod import Codemod from tests.shared.skills.decorators import skill, skill_impl from graph_sitter.core.codebase import Codebase from graph_sitter.shared.enums.programming_language import ProgrammingLanguag...
@skill(canonical=True, prompt="Generate a Python codemod that iterates through a codebase, identifying functions with local variables containing the name 'position'. For each\nidentified function, rename all occurrences of the local variable 'position' to 'pos', ensuring that the renaming is applied to all relevant usa...
5
1
9
0
6
3
4
2.22
2
1
1
0
1
0
1
32
32
3
9
7
6
20
8
6
6
4
5
3
4
327,359
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/canonical/replace_prop_values/replace_prop_values.py
replace_prop_values.ReplacePropValues
from codemods.codemod import Codemod from tests.shared.skills.skill import Skill from graph_sitter.shared.enums.programming_language import ProgrammingLanguage from graph_sitter.writer_decorators import canonical from graph_sitter.core.codebase import Codebase from tests.shared.skills.decorators import skill, skill_imp...
@skill(canonical=True, prompt="Generate a TypeScript codemod that iterates through a codebase, identifies JSX functions, and replaces any occurrences of the prop value 'text-center'\nwith 'text-left' in all JSX elements.", uid='c1914552-556b-4ae0-99f0-33cb7bfb702e') @canonical class ReplacePropValues(Codemod, Skill): ...
5
1
15
0
8
7
7
0.73
2
1
1
0
1
0
1
32
21
2
11
8
8
8
10
7
8
7
5
6
7
327,360
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/sandbox/repo.py
repo.SandboxRepo
from graph_sitter.codebase.factory.codebase_factory import CodebaseType class SandboxRepo: """Responsible for managing the state of the git repo stored in the sandbox runner""" codebase: CodebaseType def __init__(self, codebase: CodebaseType) -> None: self.codebase = codebase def set_up_base_...
class SandboxRepo: '''Responsible for managing the state of the git repo stored in the sandbox runner''' def __init__(self, codebase: CodebaseType) -> None: pass def set_up_base_branch(self, base_branch: str | None) -> None: '''Set-up base branch by pushing latest highside branch to lowsi...
6
4
10
1
6
3
2
0.44
0
3
0
0
5
0
5
5
61
12
34
12
28
15
34
12
28
4
0
1
10
327,361
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/schemas/repo_config.py
repo_config.RepoConfig
from graph_sitter.configs.models.repository import RepositoryConfig from graph_sitter.shared.enums.programming_language import ProgrammingLanguage import os.path from graph_sitter.git.schemas.enums import RepoVisibility from pydantic import BaseModel from pathlib import Path class RepoConfig(BaseModel): """All the...
class RepoConfig(BaseModel): '''All the information about the repo needed to build a codebase''' @classmethod def from_envs(cls) -> 'RepoConfig': pass @classmethod def from_repo_path(cls, repo_path: str, full_name: str | None=None) -> 'RepoConfig': pass @property def repo_pa...
9
1
5
0
5
0
1
0.16
1
4
2
0
2
0
4
86
43
8
32
20
23
5
23
16
18
2
5
1
5
327,362
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/repo_operator/repo_operator.py
repo_operator.RepoOperator
from graph_sitter.git.configs.constants import CODEGEN_BOT_EMAIL, CODEGEN_BOT_NAME import codecs from graph_sitter.git.repo_operator.local_git_repo import LocalGitRepo import fnmatch from graph_sitter.git.schemas.enums import CheckoutResult, FetchResult, RepoVisibility, SetupOption import glob import os from graph_sitt...
class RepoOperator: '''A wrapper around GitPython to make it easier to interact with a repo.''' def __init__(self, repo_config: RepoConfig, access_token: str | None=None, bot_commit: bool=False, setup_option: SetupOption | None=None, shallow: bool | None=None) -> None: pass @property def repo_...
87
33
12
1
8
3
3
0.39
0
23
9
0
61
0
64
64
884
128
548
204
438
211
478
143
412
12
0
5
177
327,363
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/repository.py
repository.RepositoryConfig
from graph_sitter.configs.models.base_config import BaseConfig import os class RepositoryConfig(BaseConfig): """Configuration for the repository context to run codegen. To automatically populate this config, call `gs init` from within a git repository. """ path: str | None = None owner: str | None ...
class RepositoryConfig(BaseConfig): '''Configuration for the repository context to run codegen. To automatically populate this config, call `gs init` from within a git repository. ''' def __init__(self, prefix: str='REPOSITORY', *args, **kwargs) -> None: pass def _initialize(self) -> None...
9
2
3
0
3
0
1
0.17
1
2
0
0
5
0
5
29
34
6
24
16
13
4
19
11
13
2
5
1
7
327,364
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/canonical/return_none_type_annotation/return_none_type_annotation.py
return_none_type_annotation.ReturnNoneTypeAnnotation
from graph_sitter.core.codebase import Codebase from graph_sitter.shared.enums.programming_language import ProgrammingLanguage from codemods.codemod import Codemod from tests.shared.skills.decorators import skill, skill_impl from graph_sitter.writer_decorators import canonical from tests.shared.skills.skill import Skil...
@skill(canonical=True, prompt="Generate a Python codemod that iterates through all functions and methods in a codebase. For each function or method that lacks return statements and\na return type annotation, set the return type to 'None'. Ensure the implementation handles both standalone functions and methods within cl...
5
1
15
1
8
6
6
0.64
2
1
1
0
1
0
1
32
21
3
11
7
8
7
10
6
8
6
5
3
6
327,365
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/commands/run/run_local.py
run_local.RichProgress
import rich.progress from graph_sitter.codebase.progress.progress import Progress import rich class RichProgress(Progress[RichTask]): _progress: rich.progress.Progress def __init__(self, progress: rich.progress.Progress) -> None: self._progress = progress def begin(self, message: str, count: int ...
class RichProgress(Progress[RichTask]): def __init__(self, progress: rich.progress.Progress) -> None: pass def begin(self, message: str, count: int | None=None) -> RichTask: pass
3
0
3
0
3
0
1
0
1
4
1
0
2
0
2
25
9
2
7
4
4
0
7
4
4
1
5
0
2
327,366
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/commands/run/run_local.py
run_local.RichTask
import rich from graph_sitter.codebase.progress.task import Task import rich.progress class RichTask(Task): _task: rich.progress.Task _progress: rich.progress.Progress _total: int | None def __init__(self, task: rich.progress.Task, progress: rich.progress.Progress, total: int | None=None) -> None: ...
class RichTask(Task): def __init__(self, task: rich.progress.Task, progress: rich.progress.Progress, total: int | None=None) -> None: pass def update(self, message: str, count: int | None=None) -> None: pass def end(self) -> None: pass
4
0
3
0
3
0
1
0
1
4
0
0
3
0
3
25
15
3
12
4
8
0
12
4
8
1
5
0
3
327,367
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/sandbox/runner.py
runner.SandboxRunner
from graph_sitter.core.codebase import Codebase from graph_sitter.git.repo_operator.repo_operator import RepoOperator from graph_sitter.shared.compilation.string_to_code import create_execute_function_from_codeblock from graph_sitter.codebase.factory.codebase_factory import CodebaseType from graph_sitter.configs.models...
class SandboxRunner: '''Responsible for orchestrating the lifecycle of a warmed sandbox''' def __init__(self, repo_config: RepoConfig, op: RepoOperator | None=None) -> None: pass async def warmup(self, codebase_config: CodebaseConfig | None=None) -> None: '''Warms up this runner by clonin...
6
2
11
2
9
1
2
0.12
0
12
12
0
5
0
5
5
70
15
50
19
44
6
49
19
43
5
0
2
10
327,368
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/docs/samples/sample.py
sample.Kevin
from dataclasses import dataclass @dataclass class Kevin: name: str favorite_chili: str desk_location: str famous_quote: str
@dataclass class Kevin: pass
2
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
5
0
5
1
4
0
5
1
4
0
0
0
0
327,369
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/docs/samples/sample.py
sample.KevinSecretSanta
from typing import List, Dict import random class KevinSecretSanta: def __init__(self): self.kevins: List[Kevin] = [Kevin('Kevin Malone', 'Famous Chili', 'Accounting Corner', 'Why waste time say lot word when few word do trick'), Kevin('Kevin McCallister', 'Microwave Mac & Chili', 'Home Alone', 'This is m...
class KevinSecretSanta: def __init__(self): pass def assign_secret_santas(self) -> None: pass def print_assignments(self) -> None: pass def spill_chili(self) -> str: pass
5
0
9
0
9
0
2
0
0
2
1
0
4
2
4
4
39
3
36
11
31
0
23
11
18
4
0
3
8
327,370
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/schema.py
schema.CodemodConfig
from pydantic import BaseModel class CodemodConfig(BaseModel): """Configuration for a codemod.""" name: str codemod_id: int description: str | None = None created_at: str created_by: str
class CodemodConfig(BaseModel): '''Configuration for a codemod.''' pass
1
1
0
0
0
0
0
0.17
1
0
0
0
0
0
0
82
8
1
6
2
5
1
6
2
5
0
5
0
0
327,371
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/schema.py
schema.SafeBaseModel
from pydantic import BaseModel class SafeBaseModel(BaseModel): @classmethod def model_validate(cls, data: dict) -> 'Self': try: return super().model_validate(data) except Exception as e: print(e) return None def __str__(self) -> str: return self...
class SafeBaseModel(BaseModel): @classmethod def model_validate(cls, data: dict) -> 'Self': pass def __str__(self) -> str: pass
4
0
4
0
4
0
2
0
1
4
0
0
1
0
2
84
11
1
10
5
6
0
9
3
6
2
5
1
3
327,372
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/examples/examples/sqlalchemy_1.6_to_2.0/input_repo/schemas.py
schemas.Book
from typing import List, Optional class Book(BookBase): id: int publisher: Optional[Publisher] class Config: orm_mode = True
null
2
0
0
0
0
0
0
0
1
0
0
0
0
0
0
82
6
1
5
3
3
0
5
3
3
0
6
0
0
327,373
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/examples/examples/sqlalchemy_1.6_to_2.0/input_repo/schemas.py
schemas.BookBase
from typing import List, Optional from pydantic import BaseModel class BookBase(BaseModel): title: str author: str description: str publisher_id: Optional[int]
class BookBase(BaseModel): pass
1
0
0
0
0
0
0
0
1
0
0
2
0
0
0
82
5
0
5
1
4
0
5
1
4
0
5
0
0
327,374
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/examples/examples/sqlalchemy_1.6_to_2.0/input_repo/schemas.py
schemas.BookCreate
class BookCreate(BookBase): pass
class BookCreate(BookBase): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
82
2
0
2
1
1
0
2
1
1
0
6
0
0
327,375
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/examples/examples/sqlalchemy_1.6_to_2.0/input_repo/schemas.py
schemas.Publisher
from typing import List, Optional class Publisher(PublisherBase): id: int books: List['Book'] = [] class Config: orm_mode = True
null
2
0
0
0
0
0
0
0
1
0
0
0
0
0
0
82
6
1
5
4
3
0
5
4
3
0
6
0
0
327,376
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/examples/examples/sqlalchemy_1.6_to_2.0/input_repo/schemas.py
schemas.PublisherBase
from pydantic import BaseModel class PublisherBase(BaseModel): name: str
class PublisherBase(BaseModel): pass
1
0
0
0
0
0
0
0
1
0
0
2
0
0
0
82
2
0
2
1
1
0
2
1
1
0
5
0
0
327,377
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/examples/examples/sqlalchemy_1.6_to_2.0/input_repo/schemas.py
schemas.PublisherCreate
class PublisherCreate(PublisherBase): pass
class PublisherCreate(PublisherBase): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
82
2
0
2
1
1
0
2
1
1
0
6
0
0
327,378
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/secrets.py
secrets.SecretsConfig
from graph_sitter.configs.models.base_config import BaseConfig class SecretsConfig(BaseConfig): """Configuration for various API secrets and tokens. Loads from environment variables. Falls back to .env file for missing values. """ def __init__(self, prefix: str='', *args, **kwargs) -> None: ...
class SecretsConfig(BaseConfig): '''Configuration for various API secrets and tokens. Loads from environment variables. Falls back to .env file for missing values. ''' def __init__(self, prefix: str='', *args, **kwargs) -> None: pass
2
1
2
0
2
0
1
0.67
1
2
0
0
1
0
1
25
13
3
6
5
4
4
6
5
4
1
5
0
1
327,379
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/examples/examples/codegen-mcp-server/server.py
server.CodebaseState
from dataclasses import dataclass, field from typing import Annotated, Any, Dict, List, Optional from graph_sitter import Codebase @dataclass class CodebaseState: """Class to manage codebase state and parsing.""" parsed_codebase: Optional[Codebase] = None log_buffer: List[str] = field(default_factory=list)...
@dataclass class CodebaseState: '''Class to manage codebase state and parsing.''' def __post_init__(self): '''Initialize by parsing the codebase immediately.''' pass def parse(self, path: str) -> None: '''Parse the codebase at the given path.''' pass def reset(self) ->...
5
4
4
0
3
1
1
0.27
0
2
0
0
3
0
3
3
23
4
15
8
11
4
15
8
11
2
0
1
4
327,380
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/auth/session.py
session.CliSession
from pathlib import Path from graph_sitter.cli.rich.codeblocks import format_command import rich from graph_sitter.configs.session_manager import session_manager from github.MainClass import Github from graph_sitter.configs.constants import CODEGEN_DIR_NAME, ENV_FILENAME import click from graph_sitter.configs.user_conf...
class CliSession: '''Represents an authenticated codegen session with user and repository context''' def __init__(self, repo_path: Path, git_token: str | None=None) -> None: pass @classmethod def from_active_session(cls) -> 'CliSession | None': pass def _initialize(self) -> None: ...
7
3
12
1
10
0
2
0.05
0
6
2
0
4
0
5
5
72
13
56
9
49
3
55
8
49
6
0
2
12
327,381
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/session_manager.py
session_manager.SessionManager
from graph_sitter.configs.constants import SESSION_FILE from pathlib import Path import json class SessionManager: active_session_path: str | None sessions: list[str] def __init__(self, **kwargs) -> None: if SESSION_FILE.exists(): with open(SESSION_FILE) as f: json_conf...
class SessionManager: def __init__(self, **kwargs) -> None: pass def get_session(self, session_root_path: Path) -> str | None: pass def get_active_session(self) -> Path | None: pass def set_active_session(self, session_root_path: Path) -> None: pass def save(sel...
8
0
6
1
5
0
2
0
0
5
0
0
7
0
7
7
53
12
41
14
33
0
37
12
29
3
0
2
13
327,382
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/rich/spinners.py
spinners.SpinnerConfig
from dataclasses import dataclass @dataclass class SpinnerConfig: """Configuration for a consistent spinner style.""" text: str spinner: str = 'dots' style: str = 'bold' spinner_style: str = 'blue'
@dataclass class SpinnerConfig: '''Configuration for a consistent spinner style.''' pass
2
1
0
0
0
0
0
0.2
0
0
0
0
0
0
0
0
7
1
5
4
4
1
5
4
4
0
0
0
0
327,383
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/canonical/split_file/split_file.py
split_file.SplitFile
from graph_sitter.core.codebase import Codebase from codemods.codemod import Codemod from graph_sitter.shared.enums.programming_language import ProgrammingLanguage from graph_sitter.writer_decorators import canonical from tests.shared.skills.skill import Skill from tests.shared.skills.decorators import skill, skill_imp...
@skill(canonical=True, prompt="Generate a Python codemod that splits a large file by moving all subclasses of 'Enum' from 'sqlglot/optimizer/scope.py' to a new file named\n'sqlglot/optimizer/enums.py'. The codemod should check if the large file exists, raise a FileNotFoundError if it does not, and then create the new\n...
5
1
16
2
9
5
4
0.5
2
2
1
0
1
0
1
32
22
4
12
8
9
6
11
7
9
4
5
2
4
327,384
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/canonical/split_file_and_rename_symbols/split_file_and_rename_symbols.py
split_file_and_rename_symbols.SplitFileAndRenameSymbols
from graph_sitter.core.codebase import CodebaseType from graph_sitter.shared.enums.programming_language import ProgrammingLanguage from graph_sitter.writer_decorators import canonical from codemods.codemod import Codemod from tests.shared.skills.skill import Skill from tests.shared.skills.decorators import skill, skill...
@skill(canonical=True, prompt="Generate a Python codemod that splits a file by moving classes containing 'Configuration' to a new file named 'configuration.py'. After moving, commit\nthe changes to ensure the new classes are recognized. Then, rename all 'Configuration' classes in the new file to 'Config'. Finally, upda...
5
1
32
6
16
10
6
0.74
2
1
0
0
1
0
1
32
43
10
19
8
16
14
18
7
16
6
5
2
6
327,385
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/canonical/split_large_files/split_large_files.py
split_large_files.SplitLargeFiles
from graph_sitter.shared.enums.programming_language import ProgrammingLanguage from graph_sitter.writer_decorators import canonical from graph_sitter.core.codebase import Codebase from codemods.codemod import Codemod from tests.shared.skills.decorators import skill, skill_impl from tests.shared.skills.skill import Skil...
@skill(canonical=True, prompt='Generate a TypeScript codemod that processes a codebase to split large files. The codemod should define constants for maximum file length (500 lines)\nand maximum symbol length (50 lines). It should iterate through all files in the codebase, checking if a file exceeds the maximum length. ...
5
1
26
1
14
11
6
0.71
2
1
1
0
1
0
1
32
32
3
17
10
14
12
16
9
14
6
5
5
6
327,386
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/string.py
string.PyString
from graph_sitter.shared.decorators.docs import py_apidoc from tree_sitter import Node as TSNode from graph_sitter.core.node_id_factory import NodeId from graph_sitter.core.expressions import Expression, String from typing import TYPE_CHECKING, Generic, TypeVar @py_apidoc class PyString(String, Generic[Parent]): "...
@py_apidoc class PyString(String, Generic[Parent]): '''An abstract representation of a python string.''' def __init__(self, ts_node: TSNode, file_node_id: NodeId, ctx: 'CodebaseContext', parent: Parent) -> None: pass
3
1
4
0
4
0
1
0.2
2
1
0
0
1
1
1
3
7
1
5
4
3
1
5
4
3
1
1
0
1
327,387
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/string.py
string.TSString
from graph_sitter.shared.decorators.docs import ts_apidoc from typing import TYPE_CHECKING, Generic, TypeVar from graph_sitter.core.node_id_factory import NodeId from tree_sitter import Node as TSNode from graph_sitter.core.expressions import Expression, String @ts_apidoc class TSString(String, Generic[Parent]): "...
@ts_apidoc class TSString(String, Generic[Parent]): '''A TypeScript string node representing both literal strings and template strings. This class handles both regular string literals and template strings in TypeScript, providing functionality to parse and manage template string expressions. It extends ...
3
1
7
0
7
0
2
1
2
1
0
0
1
1
1
3
19
3
8
4
6
8
7
4
5
2
1
1
2
327,388
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/progress/stub_progress.py
stub_progress.StubProgress
from graph_sitter.codebase.progress.stub_task import StubTask from graph_sitter.codebase.progress.progress import Progress class StubProgress(Progress[StubTask]): def begin(self, message: str, count: int | None=None) -> StubTask: return StubTask()
class StubProgress(Progress[StubTask]): def begin(self, message: str, count: int | None=None) -> StubTask: pass
2
0
2
0
2
0
1
0
1
3
1
0
1
0
1
24
3
0
3
2
1
0
3
2
1
1
5
0
1
327,389
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/progress/stub_task.py
stub_task.StubTask
from graph_sitter.codebase.progress.task import Task class StubTask(Task): def update(self, message: str, count: int | None=None) -> None: pass def end(self) -> None: pass
class StubTask(Task): def update(self, message: str, count: int | None=None) -> None: pass def end(self) -> None: pass
3
0
2
0
2
0
1
0
1
2
0
0
2
0
2
24
6
1
5
3
2
0
5
3
2
1
5
0
2
327,390
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/canonical/swap_class_attribute_usages/swap_class_attribute_usages.py
swap_class_attribute_usages.SwapClassAttributeUsages
from codemods.codemod import Codemod from tests.shared.skills.decorators import skill, skill_impl from tests.shared.skills.skill import Skill from graph_sitter.writer_decorators import canonical from graph_sitter.core.codebase import Codebase from graph_sitter.shared.enums.programming_language import ProgrammingLanguag...
@skill(canonical=True, prompt='Generate a Python codemod that transfers attributes from one class to another. The codemod should rename parameters of functions that use the first\nclass (GraphRagConfig) to use the second class (CacheConfig) instead. It should also handle variable renaming to avoid conflicts, update fun...
5
1
38
6
24
9
8
0.48
2
1
1
0
1
0
1
32
47
8
27
15
24
13
25
14
23
8
5
4
8
327,391
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/progress/task.py
task.Task
from abc import ABC, abstractmethod class Task(ABC): @abstractmethod def update(self, message: str, count: int | None=None) -> None: pass @abstractmethod def end(self) -> None: pass
class Task(ABC): @abstractmethod def update(self, message: str, count: int | None=None) -> None: pass @abstractmethod def end(self) -> None: pass
5
0
2
0
2
0
1
0
1
2
0
3
2
0
2
22
8
1
7
5
2
0
5
3
2
1
4
0
2
327,392
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/ternary_expression.py
ternary_expression.TSTernaryExpression
from graph_sitter.shared.decorators.docs import ts_apidoc from graph_sitter.core.expressions.ternary_expression import TernaryExpression @ts_apidoc class TSTernaryExpression(TernaryExpression[Parent]): """Any ternary expression in the code where a condition will determine branched execution""" def __init__(se...
@ts_apidoc class TSTernaryExpression(TernaryExpression[Parent]): '''Any ternary expression in the code where a condition will determine branched execution''' 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,393
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/examples/examples/sqlalchemy_type_annotations/input_repo/models/transaction.py
transaction.Transaction
from sqlalchemy.orm import relationship from .base import Base from sqlalchemy import Column, Integer, String, ForeignKey, Numeric, DateTime class Transaction(Base): __tablename__ = 'transactions' id = Column(Integer, primary_key=True) amount = Column(Numeric(10, 2)) description = Column(String(500)) ...
class Transaction(Base): pass
1
0
0
0
0
0
0
0.09
1
0
0
0
0
0
0
0
14
2
11
10
10
1
11
10
10
0
1
0
0
327,394
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/tree_sitter_parser.py
tree_sitter_parser._TreeSitterAbstraction
from tree_sitter import Language, Parser from typing import Union class _TreeSitterAbstraction: """Class to facilitate loading/retrieval of the Parser object for a given language. Should not be used directly, instead use `get_tree_sitter_parser` to get the parser for a given extension. """ _instance: U...
class _TreeSitterAbstraction: '''Class to facilitate loading/retrieval of the Parser object for a given language. Should not be used directly, instead use `get_tree_sitter_parser` to get the parser for a given extension. ''' def __init__(self) -> None: pass def initialize_parsers(self) ->...
3
1
3
0
3
0
2
0.5
0
0
0
0
2
0
2
2
27
3
16
8
13
8
10
8
7
2
0
1
3
327,395
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/external/ts_analyzer_engine.py
ts_analyzer_engine.NodeTypescriptEngine
import shutil import uuid import os import json import subprocess class NodeTypescriptEngine(TypescriptEngine): """Typescript-compiler based language engine using NodeJS and the TypeScript compiler. More mature approach to type inference, but is slower and less flexible. Attributes: type_data (di...
class NodeTypescriptEngine(TypescriptEngine): '''Typescript-compiler based language engine using NodeJS and the TypeScript compiler. More mature approach to type inference, but is slower and less flexible. Attributes: type_data (dict | None): Type data for the codebase ''' def __init__(sel...
4
1
26
2
20
4
3
0.25
1
7
0
0
3
6
3
33
91
12
63
19
59
16
55
17
51
5
7
3
10
327,396
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/external/ts_analyzer_engine.py
ts_analyzer_engine.TypescriptEngine
from abc import abstractmethod from graph_sitter.core.external.language_engine import LanguageEngine class TypescriptEngine(LanguageEngine): dependency_manager: 'DependencyManager | None' def __init__(self, repo_path: str, base_path: str | None=None, dependency_manager: 'DependencyManager | None'=None): ...
class TypescriptEngine(LanguageEngine): def __init__(self, repo_path: str, base_path: str | None=None, dependency_manager: 'DependencyManager | None'=None): pass @abstractmethod def _start(self): pass
4
0
5
0
4
1
2
0.18
1
2
0
2
2
0
2
30
15
2
11
4
7
2
10
3
7
2
6
1
3
327,397
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/external/ts_analyzer_engine.py
ts_analyzer_engine.V8TypescriptEngine
from pathlib import Path from graph_sitter.typescript.external.mega_racer import MegaRacer from py_mini_racer._types import JSEvalException import os from py_mini_racer._objects import JSMappedObject from py_mini_racer import MiniRacer class V8TypescriptEngine(TypescriptEngine): """Typescript-compiler based langua...
class V8TypescriptEngine(TypescriptEngine): '''Typescript-compiler based language engine using MiniRacer's V8-based JS engine. More experimental approach to type inference, but is faster and more flexible. Attributes: hard_memory_limit (int): Maximum memory limit in bytes before V8 will force garba...
6
2
19
1
16
2
3
0.21
1
10
1
0
5
5
5
35
115
14
84
31
71
18
70
21
64
7
7
6
15
327,398
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/external/ts_declassify/ts_declassify.py
ts_declassify.TSDeclassify
import os import subprocess import shutil from graph_sitter.core.external.external_process import ExternalProcess class TSDeclassify(ExternalProcess): def __init__(self, repo_path: str, base_path: str, working_dir: str='/tmp/ts_declassify'): super().__init__(repo_path, base_path) self.working_dir ...
class TSDeclassify(ExternalProcess): def __init__(self, repo_path: str, base_path: str, working_dir: str='/tmp/ts_declassify'): pass def _start(self): pass def reparse(self): pass def declassify(self, source: str, filename: str='file.tsx', error_on_failure: bool=True): ...
5
0
20
3
15
3
3
0.19
1
7
0
0
4
3
4
31
84
14
59
16
54
11
58
13
53
5
5
2
12
327,399
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/slack/types.py
types.Block
from typing import Literal from pydantic import BaseModel, Field class Block(BaseModel): type: Literal['rich_text', 'section', 'divider', 'header', 'context', 'actions', 'image'] block_id: str elements: list[RichTextSection]
class Block(BaseModel): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
82
4
0
4
1
3
0
4
1
3
0
5
0
0