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,100
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/tuple_type.py
core.expressions.tuple_type.TupleType
from graph_sitter.compiled.autocommit import reader from collections.abc import Generator from tree_sitter import Node as TSNode from graph_sitter.codebase.resolution_stack import ResolutionStack from graph_sitter.core.node_id_factory import NodeId from graph_sitter.shared.decorators.docs import apidoc, noapidoc from t...
@apidoc class TupleType(Collection[Type, Parent], Type[Parent], Generic[TType, Parent]): '''An abstract representation of a tuple type. For example `[number, number]`. ''' def __init__(self, ts_node: TSNode, file_node_id: NodeId, ctx: 'CodebaseContext', parent: Parent): pass def _get_types...
11
2
5
0
5
0
2
0.15
3
3
0
0
4
1
4
109
34
4
26
14
16
4
20
12
15
3
8
2
8
327,101
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/type.py
core.expressions.type.Type
from typing import TYPE_CHECKING, Generic, TypeVar import itertools from graph_sitter.core.interfaces.chainable import Chainable from graph_sitter.shared.decorators.docs import apidoc, noapidoc from graph_sitter.compiled.autocommit import reader from abc import ABC, abstractmethod from graph_sitter.core.expressions.exp...
@apidoc class Type(Expression[Parent], Chainable, ABC, Generic[Parent]): '''Abstract representation of a type Used to store the types of variables, parameters, or return values in functions, classes, etc. ''' @noapidoc @abstractmethod def _compute_dependencies(self, usage_type: UsageKind, de...
13
2
4
0
3
0
2
0.22
4
3
1
12
3
0
3
31
26
4
18
9
6
4
11
6
6
3
4
2
5
327,102
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/unary_expression.py
core.expressions.unary_expression.UnaryExpression
from graph_sitter.core.autocommit import writer from collections.abc import Generator from graph_sitter.core.interfaces.editable import Editable from graph_sitter.compiled.autocommit import commiter, reader from typing import Generic, Self, TypeVar, override from graph_sitter.compiled.utils import TSNode from graph_sit...
@apidoc class UnaryExpression(Expression[Parent], Chainable, Generic[Parent]): '''Unary expression which is a single operation on a single operand. eg. -5, !true. Attributes: argument: The argument of the unary expression ''' def __init__(self, ts_node: TSNode, file_node_id: NodeId, ctx: Codeba...
12
3
5
1
3
1
1
0.45
3
7
4
0
4
0
4
12
38
9
20
8
9
9
13
5
8
2
2
1
5
327,103
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/union_type.py
core.expressions.union_type.UnionType
from tree_sitter import Node as TSNode from collections.abc import Generator from typing import TYPE_CHECKING, Generic, Self, TypeVar, override from graph_sitter.compiled.autocommit import reader from graph_sitter.codebase.resolution_stack import ResolutionStack from graph_sitter.core.expressions.type import Type from ...
@apidoc class UnionType(Collection[Type, Parent], Type[Parent], Generic[TType, Parent]): '''An abstract representation of a union type. For example `str | None` or `string | number`. ''' def __init__(self, ts_node: TSNode, file_node_id: NodeId, ctx: 'CodebaseContext', parent: Parent): pass ...
11
2
5
0
5
0
2
0.15
3
3
0
2
4
1
4
109
34
4
26
14
16
4
20
12
15
3
8
2
8
327,104
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/unpack.py
core.expressions.unpack.Unpack
from graph_sitter.core.expressions import Expression from graph_sitter.core.interfaces.has_value import HasValue from typing import TYPE_CHECKING, Generic, TypeVar from graph_sitter.core.interfaces.wrapper_expression import IWrapper from graph_sitter.shared.decorators.docs import apidoc from graph_sitter.core.interface...
@apidoc class Unpack(Unwrappable[Parent], HasValue, IWrapper, Generic[Parent]): '''Unpacking of an iterable. Example: ```python [a, *b] ``` ''' def __init__(self, ts_node, file_node_id, ctx, parent: Parent): pass def unwrap(self, node: Expression | None=None) -> Non...
4
2
19
3
12
5
4
0.6
4
2
1
0
2
1
2
17
48
8
25
8
21
15
23
8
19
6
3
3
7
327,105
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/value.py
core.expressions.value.Value
from graph_sitter.compiled.autocommit import commiter from graph_sitter.core.expressions.expression import Expression from typing import TYPE_CHECKING, Generic, TypeVar from graph_sitter.shared.decorators.docs import apidoc, noapidoc @apidoc class Value(Expression[Parent], Generic[Parent]): """Editable attribute o...
@apidoc class Value(Expression[Parent], Generic[Parent]): '''Editable attribute on code objects that has a value. For example, Functions, Classes, Assignments, Interfaces, Expressions, Arguments and Parameters all have values. See also HasValue. ''' def __init__(self, *args, **kwargs): pass...
6
1
3
0
3
0
2
0.44
2
1
0
0
2
0
2
5
17
4
9
5
4
4
7
4
4
2
2
1
3
327,106
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/external_module.py
core.external_module.ExternalModule
from graph_sitter.core.autocommit import commiter, reader from typing import TYPE_CHECKING, Literal, override from graph_sitter.core.interfaces.has_attribute import HasAttribute from graph_sitter.visualizations.enums import VizNode from graph_sitter.core.interfaces.callable import Callable from graph_sitter.core.placeh...
@apidoc class ExternalModule(Callable, HasAttribute['ExternalModule']): '''Represents an external module, like `datetime`, that can be referenced. These are only added to the graph during import resolution and will not exist in a local file's subgraph. This is because we don't know what an import is referencing...
32
6
7
1
3
3
1
0.74
2
11
4
0
12
7
13
31
135
29
61
37
27
45
41
22
27
2
5
1
15
327,107
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/file.py
core.file.File
from graph_sitter.codebase.codebase_context import CodebaseContext from graph_sitter.enums import EdgeType, ImportType, NodeType, SymbolType from pathlib import Path import os from graph_sitter.core.interfaces.editable import Editable from typing import TYPE_CHECKING, Generic, Literal, Self, TypeVar, override from typi...
@apidoc class File(Editable[None]): '''Represents a generic file. Could represent a source file or a non-code file such as a markdown file or image file. Attributes: name: The name of the file. file_path: The relative file path as a string. path: The absolute path of the file as a Pa...
60
20
12
2
4
5
2
0.92
1
14
4
1
21
0
23
139
350
71
146
59
87
134
106
38
82
4
6
2
39
327,108
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/file.py
core.file.SourceFile
from graph_sitter.shared.decorators.docs import apidoc, noapidoc from graph_sitter.enums import EdgeType, ImportType, NodeType, SymbolType from graph_sitter.core.symbol import Symbol import re from graph_sitter.core.statements.import_statement import ImportStatement import resource from graph_sitter.core.interfaces.usa...
@apidoc class SourceFile(File, HasBlock, Usable, HasAttribute[Symbol | TImport], Generic[TImport, TFunction, TClass, TGlobalVar, TInterface, TCodeBlock]): '''Represents a file with source code in the codebase. Enables creating, reading, updating, and deleting files and searching through their contents, etc....
128
38
14
2
6
5
2
0.73
5
30
13
0
42
8
46
203
781
145
367
159
234
269
270
103
222
9
7
4
103
327,109
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/function.py
core.function.Function
from graph_sitter.visualizations.enums import VizNode from graph_sitter.core.interfaces.chainable import Chainable from graph_sitter.enums import SymbolType from graph_sitter.shared.decorators.docs import apidoc, noapidoc from graph_sitter.codebase.resolution_stack import ResolutionStack from graph_sitter.core.autocomm...
@apidoc class Function(SupportsGenerics[TType], HasBlock[TCodeBlock, TDecorator], Callable[TParameter, TType], Chainable, Generic[TDecorator, TCodeBlock, TParameter, TType]): '''Abstract representation of a Function. Attributes: symbol_type: The type of symbol, set to SymbolType.Function. ''' @p...
68
20
10
2
4
5
2
1.14
5
13
4
2
25
4
25
33
374
79
138
76
63
157
89
43
61
4
2
2
41
327,110
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/import_resolution.py
core.import_resolution.ExternalImportResolver
class ExternalImportResolver: def resolve(self, imp: Import) -> str | None: return None
class ExternalImportResolver: def resolve(self, imp: Import) -> str | None: pass
2
0
2
0
2
0
1
0
0
2
1
1
1
0
1
1
3
0
3
2
1
0
3
2
1
1
0
0
1
327,111
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/import_resolution.py
core.import_resolution.Import
from graph_sitter.codebase.resolution_stack import ResolutionStack from graph_sitter.core.interfaces.editable import Editable from graph_sitter.core.expressions.name import Name from graph_sitter.core.dataclasses.usage import UsageKind from graph_sitter.core.interfaces.has_attribute import HasAttribute from graph_sitte...
@apidoc class Import(Usable[ImportStatement], Chainable, Generic[TSourceFile], HasAttribute[TSourceFile]): '''Represents a single symbol being imported. Attributes: to_file_id: The node ID of the file to which this import belongs. module: The module from which the symbol is being imported, if ap...
89
27
14
2
6
6
3
0.88
4
24
13
1
36
8
36
54
620
110
272
111
171
240
193
63
153
14
4
3
93
327,112
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/import_resolution.py
core.import_resolution.ImportResolution
from typing import TYPE_CHECKING, ClassVar, Generic, Literal, Self, TypeVar, override from graph_sitter.core.external_module import ExternalModule from dataclasses import dataclass @dataclass class ImportResolution(Generic[TSourceFile]): """Represents the resolution of an import statement to a symbol defined in an...
@dataclass class ImportResolution(Generic[TSourceFile]): '''Represents the resolution of an import statement to a symbol defined in another file. Has the following properties: - from_file: Optional[SourceFile]. None when import resolves to an external module - symbol: Optional[Union[Symbol, ExternalModu...
2
1
0
0
0
0
0
2.25
1
0
0
0
0
0
0
2
12
2
4
4
3
9
4
4
3
0
1
0
0
327,113
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/import_resolution.py
core.import_resolution.WildcardImport
from graph_sitter.core.interfaces.editable import Editable from graph_sitter.core.autocommit import commiter, reader, remover, writer from graph_sitter.shared.decorators.docs import apidoc, noapidoc from typing import TYPE_CHECKING, ClassVar, Generic, Literal, Self, TypeVar, override from graph_sitter.core.interfaces.c...
class WildcardImport(Chainable, Generic[TImport]): '''Class to represent one of many wildcard imports.''' def __init__(self, imp: TImport, symbol: Importable): pass @reader @noapidoc @override def _resolved_types(self) -> Generator[ResolutionStack[Self], None, None]: '''Resolve...
15
2
3
0
2
0
1
0.08
2
3
1
0
5
1
5
12
32
6
24
11
9
2
15
7
9
1
2
0
5
327,114
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/interface.py
core.interface.Interface
from typing import TYPE_CHECKING, Generic, Self, TypeVar, override from graph_sitter.shared.decorators.docs import apidoc, noapidoc from graph_sitter.enums import SymbolType from graph_sitter.core.interfaces.has_block import HasBlock from graph_sitter.core.interfaces.inherits import Inherits from graph_sitter.core.auto...
@apidoc class Interface(Inherits, HasBlock, HasAttribute[TAttribute], Generic[TCodeBlock, TAttribute, TFunction, TType]): '''Abstract representation of an Interface class. Attributes: parent_interfaces: All the interfaces that this interface extends. ''' @noapidoc @commiter def compute_s...
19
5
5
0
3
2
1
0.42
4
5
0
1
6
0
6
9
54
10
31
16
13
13
20
10
13
2
2
1
8
327,115
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/interfaces/callable.py
core.interfaces.callable.Callable
from graph_sitter.core.autocommit import reader from graph_sitter.core.placeholder.placeholder import Placeholder from graph_sitter.core.symbol_group import SymbolGroup from graph_sitter.core.interfaces.usable import Usable from graph_sitter.core.detached_symbols.function_call import FunctionCall from typing import TYP...
@apidoc class Callable(Usable, Generic[TParameter, TType]): '''Any symbol that can be invoked with arguments eg. Function, Class, Decorator, ExternalModule Attributes: return_type: The type of value returned by the callable, or a placeholder. ''' @property @reader(cache=False) def ca...
14
6
13
3
3
7
2
1.54
2
5
1
1
5
0
5
17
89
23
26
13
13
40
19
8
13
3
4
2
8
327,116
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/interfaces/callable.py
core.interfaces.callable.FunctionCallDefinition
from graph_sitter.core.detached_symbols.function_call import FunctionCall from dataclasses import dataclass @dataclass class FunctionCallDefinition: """Represents a function call and its definitions. This class encapsulates information about a function call and the possible callable entities that define i...
@dataclass class FunctionCallDefinition: '''Represents a function call and its definitions. This class encapsulates information about a function call and the possible callable entities that define it. Attributes: call (FunctionCall): The function call object representing the invocation. ...
2
1
0
0
0
0
0
2.67
0
0
0
0
0
0
0
0
14
3
3
1
2
8
3
1
2
0
0
0
0
327,117
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/interfaces/chainable.py
core.interfaces.chainable.Chainable
from collections.abc import Generator from graph_sitter.compiled.utils import cached_property from graph_sitter.core.interfaces.editable import Editable from graph_sitter.shared.decorators.docs import noapidoc from graph_sitter.codebase.resolution_stack import ResolutionStack from abc import abstractmethod from typing ...
@noapidoc class Chainable(Editable[Parent], Generic[Parent]): '''Represents a class that can be used as an object in a function call chain.''' @abstractmethod def _resolved_types(self) -> Generator['ResolutionStack[Self]', None, None]: pass @cached_property @noapidoc def resolved_type_fr...
14
4
9
0
7
1
3
0.15
2
6
1
15
5
0
5
7
60
8
46
18
31
7
36
11
29
7
1
4
15
327,118
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/interfaces/conditional_block.py
core.interfaces.conditional_block.ConditionalBlock
from collections.abc import Sequence from abc import ABC, abstractmethod from graph_sitter.shared.decorators.docs import noapidoc from graph_sitter.core.statements.statement import Statement class ConditionalBlock(Statement, ABC): """An interface for any code block that might not be executed in the code, e.g i...
class ConditionalBlock(Statement, ABC): '''An interface for any code block that might not be executed in the code, e.g if block/else block, try block/catch block ect. ''' @property @abstractmethod @noapidoc def other_possible_blocks(self) -> Sequence['ConditionalBlock']: '''Should r...
13
5
4
0
2
2
1
0.63
2
3
0
3
4
0
4
34
30
4
16
9
3
10
8
5
3
1
4
0
4
327,119
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/interfaces/editable.py
core.interfaces.editable.Editable
from rich.pretty import Pretty from graph_sitter.core.autocommit import commiter, reader, remover, repr_func, writer from typing import TYPE_CHECKING, Generic, Self, TypeVar, Unpack, final, overload from graph_sitter.output.constants import ANGULAR_STYLE, MAX_STRING_LENGTH from graph_sitter.utils import descendant_for_...
@apidoc class Editable(JSONable, Generic[Parent]): '''An editable instance is an abstract text representation of any text in a file. Attributes: ts_node: The TreeSitter node associated with this Editable instance. file_node_id: The unique identifier for the file node. ctx: The codebase c...
236
52
9
1
6
3
2
0.39
2
41
23
1
89
1
89
116
1,072
183
646
256
406
250
458
176
358
18
5
3
196
327,120
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/interfaces/exportable.py
core.interfaces.exportable.Exportable
from graph_sitter.core.autocommit import reader from rustworkx import NoSuitableNeighbors from graph_sitter.core.interfaces.usable import Usable from graph_sitter.enums import EdgeType, ImportType, NodeType from typing import TYPE_CHECKING, Generic, TypeVar from graph_sitter.shared.decorators.docs import apidoc @apido...
@apidoc class Exportable(Usable[Parent], Generic[Parent]): '''An interface for any node object that can be exported eg. Class, class name, top-level functions, imports ''' @property def is_exported(self) -> bool: '''Indicates if the symbol is exported from its defining file. Ret...
15
6
14
3
4
7
2
1.3
2
6
3
4
5
1
5
7
87
18
30
14
16
39
22
8
16
3
1
2
9
327,121
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/interfaces/has_attribute.py
core.interfaces.has_attribute.HasAttribute
from typing import TYPE_CHECKING, Generic, TypeVar from abc import abstractmethod class HasAttribute(Generic[Attribute]): @abstractmethod def resolve_attribute(self, name: str) -> Attribute | None: """Resolve an attribute belonging to this object.""" pass
class HasAttribute(Generic[Attribute]): @abstractmethod def resolve_attribute(self, name: str) -> Attribute | None: '''Resolve an attribute belonging to this object.''' pass
3
1
3
0
2
1
1
0.25
1
1
0
10
1
0
1
3
5
0
4
3
1
1
3
2
1
1
1
0
1
327,122
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/interfaces/has_block.py
core.interfaces.has_block.HasBlock
from graph_sitter.compiled.sort import sort_editables from graph_sitter.core.statements.comment import Comment from graph_sitter.core.expressions import Expression from graph_sitter.core.autocommit import reader, writer from abc import abstractmethod from typing import TYPE_CHECKING, Generic, TypeVar from graph_sitter....
@apidoc class HasBlock(Expression, Generic[TCodeBlock, TDecorator]): '''An interface for any code object that has a block of code, e.g. a function, class, etc. Attributes: code_block: The block of code associated with the code object. ''' def _parse_code_block(self, body_node: TSNode | None=Non...
21
8
13
2
5
6
2
1.09
2
5
2
8
7
0
7
9
122
25
47
21
27
51
35
15
27
5
1
2
15
327,123
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/interfaces/has_name.py
core.interfaces.has_name.HasName
from graph_sitter.core.expressions.defined_name import DefinedName from functools import cached_property from graph_sitter.core.autocommit import commiter, reader, writer from graph_sitter.core.dataclasses.usage import UsageKind from graph_sitter.core.expressions.name import Name from graph_sitter.core.expressions.chai...
@apidoc class HasName: '''An interface for any node object that has a name.''' @cached_property @reader def name(self) -> str | None: '''Retrieves the base name of the object without namespace prefixes. Returns: str | None: The base name of the object, or None if no name node...
17
6
11
2
4
5
2
0.97
0
4
3
3
6
0
6
6
85
18
34
17
17
33
25
9
17
4
0
2
14
327,124
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/interfaces/has_symbols.py
core.interfaces.has_symbols.HasSymbols
from graph_sitter.core.utils.cache_utils import cached_generator from typing import TYPE_CHECKING, Generic, ParamSpec, TypeVar from graph_sitter.shared.decorators.docs import py_noapidoc from itertools import chain from collections.abc import Iterator class HasSymbols(Generic[TFile, TSymbol, TImportStatement, TGlobalV...
class HasSymbols(Generic[TFile, TSymbol, TImportStatement, TGlobalVar, TClass, TFunction, TImport]): '''Abstract interface for files in a codebase. Abstract interface for files in a codebase. ''' @cached_generator() def files_generator(self, *args: FilesParam.args, **kwargs: FilesParam.kwargs) -> I...
26
16
3
0
2
1
1
0.4
1
5
0
3
15
0
15
17
79
16
45
29
16
18
32
17
16
1
1
0
15
327,125
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/interfaces/has_value.py
core.interfaces.has_value.HasValue
from graph_sitter.shared.decorators.docs import apidoc from graph_sitter.core.expressions.expression import Expression from graph_sitter.core.autocommit import reader, writer @apidoc class HasValue: """An interface for any node object that has a value.""" _value_node: Expression | None @property @read...
@apidoc class HasValue: '''An interface for any node object that has a value.''' @property @reader def value(self) -> Expression | None: '''Gets the value node of the object. Returns: Expression | None: The value node of the object. None if no value is set. ''' ...
7
3
10
2
3
6
2
1.2
0
2
1
14
2
0
2
2
29
7
10
5
4
12
7
3
4
2
0
1
3
327,126
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/interfaces/importable.py
core.interfaces.importable.Importable
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.enums import EdgeType from graph_sitter.shared.decorators.docs import apidoc, noapidoc from typing import TYPE_CHECKING, Generic, Self, TypeVar, Union from ...
@apidoc class Importable(Expression[Parent], HasName, Generic[Parent]): '''An interface for any node object that can import (or reference) an exportable symbol eg. All nodes that are on the graph must inherit from here Class, function, imports, exports, etc. ''' def __init__(self, ts_node: TSNode, file...
18
5
13
1
8
4
3
0.51
3
8
1
1
6
0
6
9
101
16
57
25
40
29
47
19
40
7
2
5
20
327,127
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/interfaces/inherits.py
core.interfaces.inherits.Inherits
from abc import abstractmethod from typing import TYPE_CHECKING, Generic, TypeVar from graph_sitter.core.interfaces.supports_generic import SupportsGenerics from graph_sitter.enums import EdgeType from graph_sitter.core.autocommit import commiter, reader class Inherits(SupportsGenerics, Generic[TType]): """This sy...
class Inherits(SupportsGenerics, Generic[TType]): '''This symbol inherits from other symbols.''' @commiter @abstractmethod def compute_superclass_dependencies(self) -> None: pass @reader def _get_superclasses(self, max_depth: int | None=None) -> list[Class | ExternalModule | Interface]:...
10
3
14
1
12
1
3
0.13
2
7
3
1
3
0
3
6
53
8
40
19
28
5
36
16
28
7
2
4
16
327,128
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/interfaces/parseable.py
core.interfaces.parseable.Parseable
from abc import ABC, abstractmethod class Parseable(ABC): @abstractmethod def parse(self, ctx: 'CodebaseContext') -> None: """Adds itself and its children to the codebase graph."""
class Parseable(ABC): @abstractmethod def parse(self, ctx: 'CodebaseContext') -> None: '''Adds itself and its children to the codebase graph.''' pass
3
1
2
0
1
1
1
0.33
1
0
0
0
1
0
1
21
4
0
3
3
0
1
2
2
0
1
4
0
1
327,129
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/interfaces/resolvable.py
core.interfaces.resolvable.Resolvable
from graph_sitter.core.autocommit import writer from abc import abstractmethod from graph_sitter.core.interfaces.chainable import Chainable from typing import Generic from graph_sitter.shared.decorators.docs import noapidoc class Resolvable(Chainable[Parent], Generic[Parent]): """Represents a class resolved to ano...
class Resolvable(Chainable[Parent], Generic[Parent]): '''Represents a class resolved to another symbol during the compute dependencies step.''' @abstractmethod @noapidoc @writer def rename_if_matching(self, old: str, new: str) -> None: pass
5
1
1
0
1
0
1
0.2
2
1
0
5
1
0
1
8
7
1
5
3
1
1
3
2
1
1
2
0
1
327,130
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/interfaces/supports_generic.py
core.interfaces.supports_generic.SupportsGenerics
from graph_sitter.shared.decorators.docs import noapidoc from graph_sitter.core.expressions.named_type import NamedType from graph_sitter.compiled.utils import cached_property from typing import TYPE_CHECKING, Generic, Self from graph_sitter.core.symbol_groups.type_parameters import TypeParameters from graph_sitter.cor...
class SupportsGenerics(Symbol, Generic[TType]): '''A symbol that supports generics. Attributes: type_parameters: The type parameters of the symbol, if any. ''' @cached_property @noapidoc def generics(self) -> dict[str, TType]: pass
4
1
4
0
4
0
2
0.5
2
3
1
3
1
0
1
3
15
3
8
4
4
4
6
3
4
2
1
1
2
327,131
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/interfaces/typeable.py
core.interfaces.typeable.Typeable
from graph_sitter.core.placeholder.placeholder_type import TypePlaceholder from graph_sitter.core.autocommit import commiter, reader from graph_sitter.core.interfaces.chainable import Chainable from graph_sitter.shared.decorators.docs import apidoc, noapidoc from typing import TYPE_CHECKING, Generic, Self, TypeVar, ove...
@apidoc class Typeable(Chainable[Parent], Generic[TType, Parent]): '''An interface for any node object that can be typed, eg. function parameters, variables, etc. Attributes: type: The type annotation associated with this node ''' @commiter def _init_type(self, type_name: str='type') -> None...
11
2
4
0
2
1
1
0.53
2
4
1
2
3
1
3
10
29
6
15
8
5
8
9
5
5
2
2
1
4
327,132
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/interfaces/unwrappable.py
core.interfaces.unwrappable.Unwrappable
from abc import abstractmethod from graph_sitter.shared.decorators.docs import apidoc from graph_sitter.core.expressions import Expression from typing import Generic @apidoc class Unwrappable(Expression[Parent], Generic[Parent]): """An abstract representation of an expression that can be unwrapped. Expressions...
@apidoc class Unwrappable(Expression[Parent], Generic[Parent]): '''An abstract representation of an expression that can be unwrapped. Expressions that can be unwrapped include binary expressions and ternary expressions. ''' @abstractmethod def unwrap(self, node: Expression | None=None) -> None: ...
4
2
6
1
1
4
1
2.33
2
0
0
3
1
0
1
3
12
2
3
3
0
7
2
2
0
1
1
0
1
327,133
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/interfaces/usable.py
core.interfaces.usable.Usable
from graph_sitter.core.interfaces.importable import Importable from graph_sitter.shared.decorators.docs import apidoc from graph_sitter.core.dataclasses.usage import Usage, UsageType from typing import TYPE_CHECKING, Generic, TypeVar from graph_sitter._proxy import proxy_property from graph_sitter.enums import EdgeType...
@apidoc class Usable(Importable[Parent], Generic[Parent]): '''An interface for any node object that can be referenced by another node.''' @proxy_property @reader(cache=False) def symbol_usages(self, usage_types: UsageType | None=None) -> list[Import | Symbol | Export]: '''Returns a list of symbo...
9
4
20
4
8
9
3
0.96
2
8
2
4
3
0
3
12
70
15
28
15
20
27
24
13
20
5
3
3
9
327,134
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/interfaces/wrapper_expression.py
core.interfaces.wrapper_expression.IWrapper
from graph_sitter.core.interfaces.has_name import HasName from typing import TYPE_CHECKING, Self, final, override from abc import abstractmethod from graph_sitter.core.autocommit import reader from graph_sitter.core.expressions import Expression from graph_sitter.shared.decorators.docs import noapidoc from collections....
class IWrapper(Chainable, Editable): '''Any expression or statement that contains another expression. This is a simple interface to unwrap the nested expression. ''' @property @abstractmethod @reader def value(self) -> Expression | None: '''The value of the object.''' pass ...
18
3
3
0
3
0
1
0.19
2
2
0
4
5
0
5
12
37
6
26
12
8
5
14
7
8
2
2
1
7
327,135
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/parser.py
core.parser.CanParse
from typing import TYPE_CHECKING, Generic, Protocol, Self, TypeVar class CanParse(Protocol, Generic[Parent]): def __init__(self, node: TSNode, file_node_id: NodeId, ctx: CodebaseContext, parent: Parent) -> None: ...
class CanParse(Protocol, Generic[Parent]): def __init__(self, node: TSNode, file_node_id: NodeId, ctx: CodebaseContext, parent: Parent) -> None: pass
2
0
1
0
1
0
1
0
2
0
0
0
1
0
1
25
2
0
2
2
1
0
3
2
1
1
5
0
1
327,136
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/parser.py
core.parser.Parser
from dataclasses import dataclass, field from rich.console import Console from graph_sitter.core.expressions.placeholder_type import PlaceholderType from graph_sitter.core.statements.symbol_statement import SymbolStatement from typing import TYPE_CHECKING, Generic, Protocol, Self, TypeVar from graph_sitter.utils import...
@dataclass class Parser(Generic[Expression]): def _process_type(self, expr_type: type[Type] | dict[str, type[Type]], node: TSNode) -> tuple[type[Type], TSNode]: pass @classmethod def from_node_classes(cls, node_classes: NodeClasses, log_parse_warnings: bool=False) -> Self: pass def par...
12
0
27
2
24
1
9
0.06
1
46
35
0
8
0
9
11
262
28
221
65
176
13
172
58
128
29
1
5
77
327,137
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/placeholder/placeholder.py
core.placeholder.placeholder.Placeholder
from graph_sitter.core.autocommit import repr_func from graph_sitter.shared.decorators.docs import apidoc from typing import TYPE_CHECKING, Generic, Literal, TypeVar from abc import ABC, abstractmethod @apidoc class Placeholder(ABC, Generic[Parent]): """A placeholder for a node that does not exist yet. Use bo...
@apidoc class Placeholder(ABC, Generic[Parent]): '''A placeholder for a node that does not exist yet. Use bool checks (ie is node) to check if the node exists. You can call edit to replace the placeholder with a real node and it will automatically insert formatting. ''' def __init__(self, parent: P...
10
4
7
1
2
4
1
1.81
2
3
0
4
6
0
6
28
59
14
16
9
7
29
14
7
7
1
4
0
6
327,138
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/placeholder/placeholder_stub.py
core.placeholder.placeholder_stub.StubPlaceholder
from typing import TYPE_CHECKING, Generic, TypeVar from graph_sitter.core.placeholder.placeholder import Placeholder from graph_sitter.shared.decorators.docs import apidoc @apidoc class StubPlaceholder(Placeholder[Parent], Generic[Parent]): """A placeholder for a stub that does not exist. Can be populated usin...
@apidoc class StubPlaceholder(Placeholder[Parent], Generic[Parent]): '''A placeholder for a stub 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: '''Edits the source code of ...
3
2
15
3
2
10
1
4.33
2
4
0
0
1
0
1
29
20
4
3
2
1
13
3
2
1
1
5
0
1
327,139
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/placeholder/placeholder_type.py
core.placeholder.placeholder_type.TypePlaceholder
from graph_sitter.core.placeholder.placeholder import Placeholder from typing import TYPE_CHECKING, Generic, TypeVar from graph_sitter.shared.decorators.docs import apidoc @apidoc class TypePlaceholder(Placeholder[Parent], Generic[Parent]): """A placeholder for a Type node that does not exist. Can be populated...
@apidoc class TypePlaceholder(Placeholder[Parent], Generic[Parent]): '''A placeholder for a Type node 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: '''Edits the type annot...
3
2
21
3
7
11
3
1.75
2
3
0
0
1
0
1
29
26
4
8
2
6
14
7
2
5
3
5
2
3
327,140
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/plugins/axios.py
core.plugins.axios.AxiosApiFinder
from graph_sitter.core.plugins.plugin import Plugin from graph_sitter.shared.enums.programming_language import ProgrammingLanguage from graph_sitter.core.symbol_groups.dict import Dict from graph_sitter.core.expressions import String from graph_sitter.core.detached_symbols.function_call import FunctionCall from graph_s...
class AxiosApiFinder(Plugin): def execute(self, codebase: 'TSCodebaseType'): pass def resolve_http(val) -> Editable: pass
3
0
19
1
18
0
7
0
1
4
4
0
1
0
1
23
34
3
31
11
28
0
31
11
28
10
5
6
13
327,141
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/plugins/flask.py
core.plugins.flask.FlaskApiFinder
from graph_sitter.core.plugins.plugin import Plugin from graph_sitter.shared.enums.programming_language import ProgrammingLanguage class FlaskApiFinder(Plugin): language: ProgrammingLanguage = ProgrammingLanguage.PYTHON def execute(self, codebase: 'PyCodebaseType'): logger.info('Scanning for flask end...
class FlaskApiFinder(Plugin): def execute(self, codebase: 'PyCodebaseType'): pass
2
0
31
3
28
0
14
0
1
0
0
0
1
0
1
23
34
4
30
11
28
0
30
11
28
14
5
5
14
327,142
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/plugins/modal.py
core.plugins.modal.ModalApiFinder
from graph_sitter.core.plugins.plugin import Plugin from graph_sitter.shared.enums.programming_language import ProgrammingLanguage class ModalApiFinder(Plugin): language: ProgrammingLanguage = ProgrammingLanguage.PYTHON def execute(self, codebase: 'PyCodebaseType'): logger.info('Scanning for modal end...
class ModalApiFinder(Plugin): def execute(self, codebase: 'PyCodebaseType'): pass
2
0
11
0
11
0
5
0
1
0
0
0
1
0
1
23
14
1
13
7
11
0
13
7
11
5
5
3
5
327,143
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/plugins/plugin.py
core.plugins.plugin.Plugin
from graph_sitter.shared.enums.programming_language import ProgrammingLanguage from graph_sitter.core.interfaces.editable import Editable from abc import ABC, abstractmethod class Plugin(ABC): language: ProgrammingLanguage @abstractmethod def execute(self, codebase: 'Codebase'): ... def regis...
class Plugin(ABC): @abstractmethod def execute(self, codebase: 'Codebase'): pass def register_api(self, method: str, label: str, node: Editable): pass
4
0
2
0
2
0
1
0
1
2
1
3
2
0
2
22
7
1
6
4
3
0
6
3
3
1
4
0
2
327,144
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/statements/assignment_statement.py
core.statements.assignment_statement.AssignmentStatement
from graph_sitter.shared.decorators.docs import apidoc, noapidoc from abc import abstractmethod from graph_sitter.core.dataclasses.usage import UsageKind from graph_sitter.core.interfaces.has_value import HasValue from graph_sitter.core.statements.statement import Statement, StatementType from graph_sitter.compiled.aut...
@apidoc class AssignmentStatement(Statement[TCodeBlock], HasValue, Generic[TCodeBlock, TAssignment]): '''A class that represents an assignment statement in a codebase, such as `x = 1`, `a, b = 1, 2`, `const {a: b} = myFunc(),`, etc. This includes potentially multiple Assignments via `statement.assignments`, whi...
13
2
5
0
4
0
1
0.32
3
7
3
2
5
4
5
9
51
10
31
17
21
10
27
13
21
2
1
1
7
327,145
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/statements/attribute.py
core.statements.attribute.Attribute
import itertools from typing import TYPE_CHECKING, Generic, Self, TypeVar, override from graph_sitter.compiled.autocommit import reader from graph_sitter.core.autocommit import writer from graph_sitter.core.interfaces.chainable import Chainable from graph_sitter.shared.decorators.docs import apidoc, noapidoc from graph...
@apidoc class Attribute(AssignmentStatement[TCodeBlock, TAssignment], Usable, Chainable, Generic[TCodeBlock, TAssignment]): '''Abstract representation of an attribute on a class definition. Attributes: assignment: The assignment associated with the attribute. ''' def __init__(self, ts_node: TSN...
20
5
6
1
2
3
1
0.82
4
8
1
2
7
1
7
14
67
16
28
16
9
23
17
10
9
1
2
0
7
327,146
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/statements/block_statement.py
core.statements.block_statement.BlockStatement
from typing import TYPE_CHECKING, Generic, TypeVar from graph_sitter.compiled.autocommit import commiter, reader from graph_sitter.core.interfaces.has_block import HasBlock from graph_sitter.core.statements.statement import Statement from graph_sitter.shared.decorators.docs import apidoc, noapidoc from abc import ABC ...
@apidoc class BlockStatement(Statement[TCodeBlock], HasBlock, ABC, Generic[TCodeBlock]): '''Statement which contains a block. Attributes: code_block: The code block contained within the statement, if it exists. ''' def __init__(self, ts_node: TSNode, file_node_id: NodeId, ctx: CodebaseContext, ...
15
3
8
1
4
3
2
0.55
4
7
4
6
5
0
5
42
60
12
31
11
17
17
23
7
17
2
4
1
10
327,147
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/statements/catch_statement.py
core.statements.catch_statement.CatchStatement
from graph_sitter.core.interfaces.conditional_block import ConditionalBlock from typing import TYPE_CHECKING, Generic, Self, TypeVar from graph_sitter.shared.decorators.docs import apidoc, noapidoc from graph_sitter.core.statements.block_statement import BlockStatement from graph_sitter.compiled.autocommit import commi...
@apidoc class CatchStatement(ConditionalBlock, BlockStatement[Parent], Generic[Parent]): '''Abstract representation catch clause. Attributes: code_block: The code block that may trigger an exception condition: The condition which triggers this clause ''' @noapidoc @commiter def _...
5
1
4
0
4
0
2
0.63
3
3
2
2
1
0
1
47
16
3
8
4
4
5
6
3
4
2
5
1
2
327,148
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/statements/comment.py
core.statements.comment.Comment
from graph_sitter.core.statements.statement import Statement, StatementType from graph_sitter.core.dataclasses.usage import UsageKind from graph_sitter.core.autocommit import commiter, reader, writer from graph_sitter.shared.decorators.docs import apidoc, noapidoc from typing import TYPE_CHECKING, Generic, TypeVar @ap...
@apidoc class Comment(Statement[TCodeBlock], Generic[TCodeBlock]): '''Abstract representation of comment statements.''' @property @reader def nested_code_blocks(self: Statement[TCodeBlock]) -> list[TCodeBlock]: '''Returns a list of nested code blocks within the statement. A property that...
26
7
8
1
2
4
1
0.86
2
5
0
2
7
0
8
10
88
19
37
21
12
32
21
13
12
1
1
0
8
327,149
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/statements/export_statement.py
core.statements.export_statement.ExportStatement
from graph_sitter.typescript.export import TSExport from typing import TYPE_CHECKING, Generic, Self, TypeVar from graph_sitter.utils import find_first_ancestor from graph_sitter.compiled.autocommit import commiter from graph_sitter.core.dataclasses.usage import UsageKind from graph_sitter.core.symbol_groups.collection ...
@apidoc class ExportStatement(Statement['TSCodeBlock'], Generic[TExport]): '''Abstract representation of a single export statement that appears in a file. One export statement can export multiple symbols from a single source. Attributes: exports: A list of the individual exports this statement repre...
11
2
12
0
9
2
3
0.29
2
8
4
0
6
2
6
8
89
9
62
27
52
18
48
19
41
12
1
4
20
327,150
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/statements/expression_statement.py
core.statements.expression_statement.ExpressionStatement
from graph_sitter.core.interfaces.has_value import HasValue from graph_sitter.compiled.autocommit import commiter, reader from typing import TYPE_CHECKING, Generic, TypeVar from graph_sitter.core.statements.statement import Statement, StatementType from graph_sitter.shared.decorators.docs import apidoc, noapidoc from g...
@apidoc class ExpressionStatement(Statement, HasValue, IWrapper, Generic[Parent, TCodeBlock]): '''Abstract representation of any expression statements that resolves to an expression. In some languages without a statement delimiter, expression statement and the enclosed expression looks the same in text. ...
10
2
4
1
3
1
1
1.19
4
8
4
0
4
1
4
26
44
9
16
9
7
19
12
7
7
2
3
1
5
327,151
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/statements/for_loop_statement.py
core.statements.for_loop_statement.ForLoopStatement
from graph_sitter.shared.decorators.docs import apidoc, noapidoc from graph_sitter.core.symbol_groups.collection import Collection from graph_sitter.core.statements.statement import StatementType from graph_sitter.core.interfaces.chainable import Chainable from typing import TYPE_CHECKING, Generic, Self, TypeVar from g...
@apidoc class ForLoopStatement(BlockStatement[Parent], HasBlock, ABC, Generic[Parent]): '''Abstract representation of the for loop. Attributes: item: The item being iterated over, if applicable. iterable: The iterable expression that the loop iterates over. ''' @noapidoc @reader ...
5
1
20
0
20
0
11
0.19
4
12
5
2
1
0
1
43
34
3
26
7
22
5
23
6
21
11
5
7
11
327,152
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/statements/if_block_statement.py
core.statements.if_block_statement.IfBlockStatement
from graph_sitter.core.statements.statement import Statement, StatementType from graph_sitter.compiled.autocommit import commiter from abc import abstractmethod from functools import cached_property from graph_sitter.core.autocommit import reader, writer from graph_sitter.core.interfaces.conditional_block import Condit...
@apidoc class IfBlockStatement(ConditionalBlock, Statement[TCodeBlock], Generic[TCodeBlock, TIfBlockStatement]): '''Abstract representation of the if/elif/else if/else statement block. For example, if there is a code block like: if condition1: block1 elif condition2: block2 else: ...
49
12
12
2
6
5
3
0.71
3
9
3
2
17
0
17
19
277
49
134
51
87
95
98
33
80
11
1
3
47
327,153
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/statements/import_statement.py
core.statements.import_statement.ImportStatement
from graph_sitter.core.statements.statement import Statement from graph_sitter.compiled.autocommit import commiter from graph_sitter.core.dataclasses.usage import UsageKind from graph_sitter.shared.decorators.docs import apidoc, noapidoc from typing import TYPE_CHECKING, Generic, Self, TypeVar @apidoc class ImportStat...
@apidoc class ImportStatement(Statement[TCodeBlock], Generic[TSourceFile, TImport, TCodeBlock]): '''Abstract representation of a single import statement that appears in a file. One import statement can import multiple symbols from a single source. Attributes: imports: A collection of the individual ...
7
1
3
0
3
0
1
0.46
2
3
0
2
3
0
3
5
24
5
13
5
7
6
11
4
7
2
1
1
4
327,154
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/statements/raise_statement.py
core.statements.raise_statement.RaiseStatement
from graph_sitter.compiled.autocommit import commiter, reader from graph_sitter.shared.decorators.docs import apidoc, noapidoc from typing import TYPE_CHECKING, Generic, TypeVar from graph_sitter.core.interfaces.has_value import HasValue from graph_sitter.core.statements.statement import Statement, StatementType @apid...
@apidoc class RaiseStatement(Statement[Parent], HasValue, Generic[Parent]): '''Abstract representation of raise statements, e.g. in Python: Example: def f(x): raise ValueError() ''' def __init__(self, ts_node: TSNode, file_node_id: NodeId, ctx: CodebaseContext, parent: Parent, pos: ...
10
2
5
0
4
1
2
0.43
3
7
4
0
4
1
4
16
37
7
21
10
12
9
17
8
12
2
2
1
8
327,155
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/statements/return_statement.py
core.statements.return_statement.ReturnStatement
from typing import TYPE_CHECKING, Generic, TypeVar from graph_sitter.core.statements.statement import Statement, StatementType from graph_sitter.compiled.autocommit import commiter, reader from graph_sitter.core.interfaces.has_value import HasValue from graph_sitter.shared.decorators.docs import apidoc, noapidoc @apid...
@apidoc class ReturnStatement(Statement, HasValue, Generic[Parent, TCodeBlock]): '''Abstract representation of return statements, e.g. in Python: Example: def f(x): if x: return x**2 # ReturnStatement else: return 1 # ReturnStatement ''' def __init_...
10
2
6
1
4
1
2
0.62
3
3
0
0
4
1
4
8
42
8
21
10
12
13
17
8
12
2
1
1
8
327,156
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/statements/statement.py
core.statements.statement.Statement
from functools import cached_property from graph_sitter.shared.decorators.docs import apidoc, noapidoc from graph_sitter.core.expressions import Expression from typing import TYPE_CHECKING, Generic, Self, TypeVar, final from graph_sitter.core.autocommit import reader from graph_sitter.output.constants import ANGULAR_ST...
@apidoc class Statement(Expression[Parent], Generic[Parent]): '''Represents a single code statement, e.g. a function definition, an assignment, an if/else statement, etc.''' def __init__(self, ts_node: TSNode, file_node_id: NodeId, ctx: CodebaseContext, parent: Parent, pos: int | None=None) -> None: pa...
20
4
8
1
4
2
2
0.4
2
6
3
10
7
1
8
10
87
20
48
23
28
19
38
18
28
3
1
1
13
327,157
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/statements/statement.py
core.statements.statement.StatementType
from enum import StrEnum from graph_sitter.shared.decorators.docs import apidoc, noapidoc @apidoc class StatementType(StrEnum): """Enum representing the different types of statements that can be parsed. Attributes: COMMENT: Represents a comment statement. ASSIGNMENT: Represents an assignment e...
@apidoc class StatementType(StrEnum): '''Enum representing the different types of statements that can be parsed. Attributes: COMMENT: Represents a comment statement. ASSIGNMENT: Represents an assignment expression. EXPRESSION_STATEMENT: Represents an expression statement. CLASS_A...
2
1
0
0
0
0
0
1.15
1
0
0
0
0
0
0
68
45
2
20
20
19
23
20
20
19
0
3
0
0
327,158
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/statements/switch_statement.py
core.statements.switch_statement.SwitchStatement
from graph_sitter.compiled.autocommit import commiter, reader from typing import TYPE_CHECKING, Generic, Self, TypeVar, override from graph_sitter.core.statements.statement import Statement, StatementType from graph_sitter.shared.decorators.docs import apidoc, noapidoc @apidoc class SwitchStatement(Statement[Parent], ...
@apidoc class SwitchStatement(Statement[Parent], Generic[Parent, TCodeBlock, TSwitchCase]): '''Abstract representation of the switch statement. Attributes: value: The value to switch on. cases: A list of switch cases. ''' @property @reader def function_calls(self) -> list[Functio...
15
3
9
1
5
3
2
0.52
2
5
4
2
4
0
4
14
60
10
33
18
19
17
24
14
19
3
2
2
9
327,159
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/statements/symbol_statement.py
core.statements.symbol_statement.SymbolStatement
from typing import TYPE_CHECKING, Generic, TypeVar from graph_sitter.shared.decorators.docs import apidoc, noapidoc from graph_sitter.compiled.autocommit import reader from graph_sitter.core.statements.statement import Statement, StatementType @apidoc class SymbolStatement(Statement[Parent], Generic[Parent, Child]): ...
@apidoc class SymbolStatement(Statement[Parent], Generic[Parent, Child]): '''A statement that represents a symbol definition in a codeblock. Examples include: - a function definition, class definition, global variable assignment Attributes: symbol: The symbol associated with this statement, repr...
10
3
6
1
2
3
1
1.06
2
4
1
0
4
0
4
6
43
10
16
8
7
17
12
6
7
1
1
0
4
327,160
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/statements/try_catch_statement.py
core.statements.try_catch_statement.TryCatchStatement
from graph_sitter.core.interfaces.has_block import HasBlock from abc import ABC from graph_sitter.shared.decorators.docs import apidoc, noapidoc from graph_sitter.core.interfaces.conditional_block import ConditionalBlock from typing import TYPE_CHECKING, Generic, TypeVar, override from graph_sitter.core.statements.bloc...
@apidoc class TryCatchStatement(ConditionalBlock, BlockStatement[Parent], HasBlock, ABC, Generic[Parent]): '''Abstract representation of the try catch statement block. Attributes: code_block: The code block that may trigger an exception finalizer: The code block executed regardless of if an exce...
11
1
5
0
5
0
2
0.22
5
2
0
2
3
0
3
49
33
5
23
9
13
5
15
6
11
2
5
1
6
327,161
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/statements/while_statement.py
core.statements.while_statement.WhileStatement
from graph_sitter.shared.decorators.docs import apidoc, noapidoc from graph_sitter.core.statements.statement import Statement, StatementType from abc import ABC from typing import TYPE_CHECKING, Generic, Self, TypeVar from graph_sitter.core.interfaces.has_block import HasBlock from graph_sitter.compiled.autocommit impo...
@apidoc class WhileStatement(Statement[TCodeBlock], HasBlock, ABC, Generic[TCodeBlock]): '''Abstract representation of the while statement block. Attributes: condition: The condition expression of the while statement. code_block: The code block that represents the body of the while statement. ...
15
3
7
1
4
3
1
0.6
4
8
5
2
5
0
5
42
59
11
30
13
16
18
22
9
16
1
4
0
5
327,162
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/symbol.py
core.symbol.Symbol
from graph_sitter.compiled.sort import sort_editables from abc import abstractmethod from graph_sitter.enums import ImportType, NodeType, SymbolType from graph_sitter.core.expressions.defined_name import DefinedName from graph_sitter.core.detached_symbols.function_call import FunctionCall from rich.markup import escape...
@apidoc class Symbol(Usable[Statement['CodeBlock[Parent, ...]']], Generic[Parent, TCodeBlock]): '''Abstract representation of a Symbol in a Codebase. A Symbol is a top-level entity in a file, e.g. a Function, Class, GlobalVariable, etc. Attributes: symbol_type: The type of the symbol. node_type:...
55
18
17
2
8
6
3
0.66
2
23
15
1
19
3
20
32
402
72
199
85
120
132
129
47
102
25
4
5
63
327,163
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/symbol_group.py
core.symbol_group.SymbolGroup
from graph_sitter.compiled.autocommit import commiter from graph_sitter.core.interfaces.editable import Editable from graph_sitter.core.autocommit import reader, repr_func, writer from collections.abc import Collection, Iterator from graph_sitter.shared.decorators.docs import apidoc, noapidoc from typing import TYPE_CH...
@apidoc class SymbolGroup(Editable[Parent], Collection[Child], Generic[Child, Parent]): '''These are groups of symbols that form some kind of logical grouping, like a class or module, that do not follow the traditional tree structure. ''' def __init__(self, file_node_id: NodeId, ctx: CodebaseContext, p...
53
14
8
1
3
4
1
1.14
3
8
1
3
25
0
25
54
256
56
94
53
43
107
68
30
42
4
5
1
35
327,164
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/symbol_groups/collection.py
core.symbol_groups.collection.Collection
from collections.abc import Iterable, Iterator, MutableSequence from graph_sitter.codebase.transactions import TransactionPriority from graph_sitter.core.node_id_factory import NodeId from collections import defaultdict from tree_sitter import Node as TSNode from graph_sitter.core.autocommit import reader, writer from ...
null
48
10
8
0
5
2
2
0.37
3
14
1
7
24
2
24
96
260
38
163
63
117
60
134
44
107
10
7
4
49
327,165
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/symbol_groups/comment_group.py
core.symbol_groups.comment_group.CommentGroup
from graph_sitter.shared.decorators.docs import apidoc, noapidoc from graph_sitter.core.autocommit import reader, writer from graph_sitter.core.symbol_group import SymbolGroup from graph_sitter.core.statements.comment import Comment @apidoc class CommentGroup(SymbolGroup[Comment, Parent]): """A group of comments t...
@apidoc class CommentGroup(SymbolGroup[Comment, Parent]): '''A group of comments that form a larger comment block.''' def __init__(self, children: list[Comment], file_node_id: NodeId, ctx: CodebaseContext, parent: Parent) -> None: pass @property @reader def text(self) -> str: '''Ret...
14
5
9
2
3
5
1
1.17
1
5
1
2
5
0
5
59
63
14
23
11
10
27
16
7
10
2
6
1
6
327,166
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/symbol_groups/dict.py
core.symbol_groups.dict.Dict
from graph_sitter.shared.decorators.docs import apidoc, noapidoc from graph_sitter.core.interfaces.has_name import HasName from graph_sitter.core.expressions.builtin import Builtin from tree_sitter import Node as TSNode from collections.abc import Iterator, MutableMapping from graph_sitter.core.dataclasses.usage import...
@apidoc class Dict(Expression[Parent], Builtin, MutableMapping[str, TExpression], Generic[TExpression, Parent]): '''Represents a dict (object) literal the source code. Attributes: unpack: An optional unpacking element, if present. ''' def __init__(self, ts_node: TSNode, file_node_id: NodeId, ct...
19
1
6
0
6
0
3
0.06
4
13
3
1
12
0
12
64
100
14
81
30
63
5
72
25
59
7
7
4
36
327,167
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/symbol_groups/dict.py
core.symbol_groups.dict.Pair
from graph_sitter.core.dataclasses.usage import UsageKind from graph_sitter.core.interfaces.editable import Editable from typing import TYPE_CHECKING, Generic, Self, TypeVar from graph_sitter.core.interfaces.has_name import HasName from graph_sitter.core.expressions.expression import Expression from graph_sitter.core.i...
@apidoc class Pair(Editable[Parent], HasValue, Generic[TExpression, Parent]): '''An abstract representation of a key, value pair belonging to a `Dict`. Attributes: key: The key expression of the pair, expected to be of type TExpression. ''' def __init__(self, ts_node: TSNode, file_node_id: Node...
9
2
8
1
4
3
2
0.71
3
4
1
1
4
1
4
8
45
9
21
8
13
15
18
6
13
3
1
1
8
327,168
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/symbol_groups/expression_group.py
core.symbol_groups.expression_group.ExpressionGroup
from graph_sitter.shared.decorators.docs import apidoc from graph_sitter.core.symbol_group import SymbolGroup from graph_sitter.compiled.autocommit import reader from typing import TYPE_CHECKING, Generic, TypeVar @apidoc class ExpressionGroup(SymbolGroup[TExpression, Parent], Generic[TExpression, Parent]): """Grou...
@apidoc class ExpressionGroup(SymbolGroup[TExpression, Parent], Generic[TExpression, Parent]): '''Group of contiguous set of expressions.''' @property @reader def expressions(self) -> list[TExpression]: '''Returns all expressions in the group. A property that returns all expressions stor...
11
4
12
2
3
6
2
1.18
2
3
1
0
3
0
3
57
46
9
17
10
7
20
11
7
7
3
6
2
5
327,169
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/symbol_groups/list.py
core.symbol_groups.list.List
from graph_sitter.shared.decorators.docs import apidoc from graph_sitter.core.expressions.builtin import Builtin from graph_sitter.core.node_id_factory import NodeId from graph_sitter.core.symbol_groups.collection import Collection from tree_sitter import Node as TSNode from graph_sitter.core.expressions.expression imp...
@apidoc class List(Collection['Expression[Self, None]', Parent], Expression[Parent], Builtin): '''A list object. You can use standard operations to operate on this list (IE len, del, append, insert, etc) ''' def __init__(self, ts_node: TSNode, file_node_id: NodeId, ctx: 'CodebaseContext', parent: Paren...
5
1
3
0
3
0
1
0.43
3
2
0
0
2
0
2
107
13
3
7
4
3
3
6
3
3
1
8
0
2
327,170
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/symbol_groups/multi_line_collection.py
core.symbol_groups.multi_line_collection.MultiLineCollection
from collections import defaultdict from collections.abc import Iterator from typing import TYPE_CHECKING, Generic, TypeVar from graph_sitter.core.symbol_groups.collection import Collection from graph_sitter.core.node_id_factory import NodeId from tree_sitter import Node as TSNode from graph_sitter.shared.decorators.do...
@apidoc class MultiLineCollection(Collection[Child, Parent], Generic[Child, Parent]): '''A list containing multi-line objects. Example: A list of function definitions, class definitions You can use standard operations to operate on this list (IE len, del, append, insert, etc) ''' def __init__(self,...
9
1
10
1
9
1
2
0.16
2
6
0
0
6
3
6
102
78
11
58
30
38
9
42
17
35
7
8
1
13
327,171
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/symbol_groups/parents.py
core.symbol_groups.parents.Parents
from graph_sitter.core.symbol_groups.collection import Collection from graph_sitter.enums import EdgeType from graph_sitter.core.interfaces.has_name import HasName from graph_sitter.core.dataclasses.usage import UsageKind from graph_sitter.core.autocommit import reader from typing import TYPE_CHECKING, Generic, TypeVar...
null
10
3
8
0
7
1
3
0.07
2
9
3
0
6
0
6
102
56
7
46
18
34
3
42
16
33
9
8
3
19
327,172
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/symbol_groups/tuple.py
core.symbol_groups.tuple.Tuple
from graph_sitter.core.symbol_groups.collection import Collection from graph_sitter.shared.decorators.docs import apidoc from graph_sitter.core.expressions.expression import Expression from graph_sitter.core.expressions.builtin import Builtin from tree_sitter import Node as TSNode from graph_sitter.core.node_id_factory...
@apidoc class Tuple(Collection['Expression[Self, None]', Parent], Expression[Parent], Builtin): '''A tuple object. You can use standard operations to operate on this list (IE len, del, append, insert, etc) ''' def __init__(self, ts_node: TSNode, file_node_id: NodeId, ctx: 'CodebaseContext', parent: Par...
5
1
3
0
3
0
1
0.43
3
2
0
0
2
0
2
107
13
3
7
4
3
3
6
3
3
1
8
0
2
327,173
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/symbol_groups/type_parameters.py
core.symbol_groups.type_parameters.TypeParameters
from typing import TYPE_CHECKING, Generic, TypeVar from graph_sitter.core.symbol_groups.collection import Collection class TypeParameters(Collection['TType', Parent], Generic[TType, Parent]): def __init__(self, ts_node: TSNode, file_node_id: NodeId, ctx: CodebaseContext, parent: Parent) -> None: super()._...
class TypeParameters(Collection['TType', Parent], Generic[TType, Parent]): def __init__(self, ts_node: TSNode, file_node_id: NodeId, ctx: CodebaseContext, parent: Parent) -> None: pass
2
0
3
0
3
0
1
0
2
1
0
0
1
0
1
97
4
0
4
2
2
0
4
2
2
1
8
0
1
327,174
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/type_alias.py
core.type_alias.TypeAlias
from graph_sitter.core.interfaces.has_block import HasBlock from graph_sitter.core.interfaces.supports_generic import SupportsGenerics from typing import TYPE_CHECKING, Generic, TypeVar, override from graph_sitter.core.autocommit import reader from graph_sitter.core.interfaces.has_attribute import HasAttribute from gra...
@apidoc class TypeAlias(SupportsGenerics, HasValue, HasBlock, HasAttribute[TAttribute], Generic[TCodeBlock, TAttribute]): '''Abstract representation of a Type object. Only applicable for some programming languages like TypeScript. Attributes: symbol_type: The type of symbol, set to SymbolType.Interf...
16
3
4
0
4
0
1
0.27
5
4
1
1
5
2
5
18
46
8
30
20
9
8
15
10
9
2
2
0
6
327,175
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/count_functions.py
count_functions.CountFunctionsArgs
from pydantic.fields import Field from pydantic import BaseModel from graph_sitter.cli.utils.count_functions_2 import NumberType class CountFunctionsArgs(BaseModel): number_attr: NumberType string_attr: str boolean_attr: bool list_attr: list[str] dict_attr: dict[str, str] complex_attr: str = Fi...
class CountFunctionsArgs(BaseModel): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
82
7
0
7
2
6
0
7
2
6
0
5
0
0
327,176
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/decorator.py
decorator.PyDecorator
from graph_sitter.core.autocommit import reader from graph_sitter.shared.decorators.docs import py_apidoc from graph_sitter.core.detached_symbols.function_call import FunctionCall from graph_sitter.core.detached_symbols.decorator import Decorator @py_apidoc class PyDecorator(Decorator['PyClass', 'PyFunction', 'PyParam...
@py_apidoc class PyDecorator(Decorator['PyClass', 'PyFunction', 'PyParameter']): '''Extends Decorators for Python codebases.''' @reader def _get_name_node(self) -> TSNode: '''Returns the name of the decorator.''' pass @property @reader def call(self) -> FunctionCall | None: ...
7
3
19
3
8
8
4
0.89
1
2
1
0
2
0
2
8
44
8
19
9
13
17
14
6
11
5
2
2
7
327,177
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/decorator.py
decorator.TSDecorator
from graph_sitter.core.detached_symbols.decorator import Decorator from graph_sitter.shared.decorators.docs import ts_apidoc from graph_sitter.core.autocommit import reader from graph_sitter.core.detached_symbols.function_call import FunctionCall @ts_apidoc class TSDecorator(Decorator['TSClass', 'TSFunction', 'TSParam...
@ts_apidoc class TSDecorator(Decorator['TSClass', 'TSFunction', 'TSParameter']): '''Abstract representation of a Decorator''' @reader def _get_name_node(self) -> TSNode: '''Returns the name of the decorator.''' pass @property @reader def call(self) -> FunctionCall | None: ...
7
3
17
3
8
7
4
0.74
1
1
0
0
2
0
2
8
40
7
19
9
13
14
14
6
11
5
2
2
7
327,178
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/delete_unused_functions/delete_unused_functions.py
delete_unused_functions.DeleteUnusedFunctionsCodemod
from graph_sitter.core.codebase import Codebase from graph_sitter.writer_decorators import canonical from tests.shared.skills.skill import Skill from graph_sitter.shared.enums.programming_language import ProgrammingLanguage from tests.shared.skills.decorators import skill, skill_impl from codemods.codemod import Codemo...
@skill(canonical=True, prompt='Generate a Python codemod that deletes all unused functions from a codebase. The codemod should iterate through each file in the codebase, check for\ntop-level functions, and remove any function that has no usages or call-sites. Ensure that the implementation follows best practices for id...
5
1
8
0
5
3
4
1
2
1
1
0
1
0
1
32
18
2
8
6
5
8
7
5
5
4
5
3
4
327,179
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/external/dependency_manager.py
dependency_manager.DependencyManager
from abc import abstractmethod from graph_sitter.core.external.external_process import ExternalProcess class DependencyManager(ExternalProcess): """Manages dependencies for the given repository. Handles reading, installing, and managing any dependency-based operations. """ @abstractmethod def par...
class DependencyManager(ExternalProcess): '''Manages dependencies for the given repository. Handles reading, installing, and managing any dependency-based operations. ''' @abstractmethod def parse_dependencies(self): pass @abstractmethod def install_dependencies(self): pass ...
7
1
2
0
2
0
1
0.3
1
0
0
1
3
0
3
30
17
4
10
7
3
3
7
4
3
1
5
0
3
327,180
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/dependency_manager.py
dependency_manager.InstallerType
from enum import Enum class InstallerType(Enum): NPM = 'npm' YARN = 'yarn' PNPM = 'pnpm' UNKNOWN = 'unknown'
class InstallerType(Enum): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
49
5
0
5
5
4
0
5
5
4
0
4
0
0
327,181
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/dependency_manager.py
dependency_manager.PackageJsonData
from dataclasses import dataclass @dataclass class PackageJsonData: dependencies: dict[str, str] dev_dependencies: dict[str, str] package_data: dict
@dataclass class PackageJsonData: pass
2
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
4
0
4
1
3
0
4
1
3
0
0
0
0
327,182
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/dependency_manager.py
dependency_manager.TypescriptDependencyManager
from graph_sitter.core.external.dependency_manager import DependencyManager import subprocess import requests from graph_sitter.utils import shadow_files import json import os import uuid import shutil import pyjson5 import concurrent.futures class TypescriptDependencyManager(DependencyManager): should_install_dep...
class TypescriptDependencyManager(DependencyManager): def __init__(self, repo_path: str, base_path: str | None=None, should_install_dependencies: bool=True, force_installer: str | None=None): pass def _detect_installer_type(self) -> InstallerType: pass @staticmethod def _check_package...
15
2
27
3
19
5
5
0.27
1
14
2
0
10
3
12
42
343
49
232
60
217
63
211
46
198
12
6
5
59
327,183
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/dict.py
dict.TSDict
from graph_sitter.core.expressions.string import String from graph_sitter.shared.decorators.docs import apidoc, noapidoc, ts_apidoc from graph_sitter.core.symbol_groups.dict import Dict, Pair from graph_sitter.core.interfaces.has_attribute import HasAttribute from graph_sitter.core.interfaces.editable import Editable f...
@apidoc class TSDict(Dict, HasAttribute): '''A typescript dict object. You can use standard operations to operate on this dict (IE len, del, set, get, etc)''' def __init__(self, ts_node: TSNode, file_node_id: NodeId, ctx: 'CodebaseContext', parent: Parent, delimiter: str=',', pair_type: type[Pair]=TSPair) -> N...
9
1
16
1
14
1
7
0.07
2
9
3
1
4
0
4
68
71
8
59
12
51
4
49
11
44
15
8
5
26
327,184
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/dict.py
dict.TSPair
from graph_sitter.core.autocommit import writer from typing import TYPE_CHECKING, Self, TypeVar, override from graph_sitter.core.symbol_groups.dict import Dict, Pair from graph_sitter.core.node_id_factory import NodeId from graph_sitter.shared.decorators.docs import apidoc, noapidoc, ts_apidoc from graph_sitter.core.in...
@ts_apidoc class TSPair(Pair): '''A TypeScript pair node that represents key-value pairs in object literals. A specialized class extending `Pair` for handling TypeScript key-value pairs, particularly in object literals. It provides functionality for handling both regular key-value pairs and shorthand pr...
6
2
9
1
8
1
3
0.37
1
4
1
1
3
0
3
11
45
8
27
7
21
10
22
6
17
5
2
2
8
327,185
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/docker_client.py
docker_client.DockerClient
from graph_sitter.runner.models.codemod import CodemodRunResult from graph_sitter.cli.commands.start.docker_container import DockerContainer from graph_sitter.runner.clients.client import Client from graph_sitter.runner.models.apis import RUN_FUNCTION_ENDPOINT, RunFunctionRequest from graph_sitter.cli.utils.function_fi...
class DockerClient(Client): '''Client for interacting with the locally hosted sandbox server hosted on a docker container.''' def __init__(self, container: DockerContainer): pass def run(self, codemod_source: str, commit: bool | None=None) -> CodemodRunResult: pass def run_function(s...
4
1
4
0
4
0
1
0.07
1
8
4
0
3
0
3
8
18
3
14
9
10
1
14
9
10
2
1
1
4
327,186
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/start/docker_container.py
docker_container.DockerContainer
from functools import cached_property from docker.models.containers import Container from docker.errors import APIError, NotFound import docker from docker import DockerClient class DockerContainer: _client: DockerClient _container: Container | None def __init__(self, client: DockerClient, container: Cont...
class DockerContainer: def __init__(self, client: DockerClient, container: Container) -> None: pass @classmethod def get(cls, name: str) -> 'DockerContainer | None': pass @cached_property def name(self) -> str: pass @cached_property def host(self) -> str | None: ...
15
0
5
0
5
0
2
0
0
3
0
0
9
0
10
10
67
12
55
19
40
0
51
15
40
2
0
1
17
327,187
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/decorators/docs.py
docs.DocumentedObject
from dataclasses import dataclass @dataclass class DocumentedObject: name: str module: str object: any def __lt__(self, other): return self.module < other.module def signature(self) -> str: return f'{self.name}'
@dataclass class DocumentedObject: def __lt__(self, other): pass def signature(self) -> str: pass
4
0
2
0
2
0
1
0
0
1
0
0
2
0
2
2
10
2
8
3
5
0
8
3
5
1
0
0
2
327,188
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/emojify_py_files_codemod/emojify_py_files_codemod.py
emojify_py_files_codemod.EmojifyPyFilesCodemod
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 Skill from graph_sitter.shared.enums.programming_language import ProgrammingLanguage from graph_sitter.writer_decorators import canonica...
@skill(canonical=True, prompt="Generate a Python codemod that iterates over all Python files in a codebase and adds a rainbow emoji comment at the beginning of each file. The\ncodemod should be implemented in the `execute` function of the `EmojifyPyFilesCodemod` class, which inherits from `Codemod` and `Skill`. Ensure ...
5
1
6
0
4
3
2
0.57
2
1
1
0
1
0
1
32
12
2
7
6
4
4
6
5
4
2
5
1
2
327,189
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/enum_mover/enum_mover.py
enum_mover.EnumMover
from tests.shared.skills.decorators import skill, skill_impl from graph_sitter.shared.enums.programming_language import ProgrammingLanguage from graph_sitter.core.codebase import CodebaseType from tests.shared.skills.skill import Skill from graph_sitter.writer_decorators import canonical from codemods.codemod import Co...
@skill(canonical=True, prompt='Generate a Python codemod that iterates through all classes in a codebase, identifies subclasses of Enum, and moves them to a designated enums.py\nfile. Ensure that the codemod checks if the class is already in the correct file, flags it for movement if necessary, and creates the enums.py...
5
1
23
3
13
7
6
0.75
2
0
0
0
1
0
1
32
33
5
16
8
13
12
14
7
12
6
5
4
6
327,190
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/enums.py
enums.CheckoutResult
from enum import StrEnum, auto class CheckoutResult(StrEnum): SUCCESS = 'SUCCESS' NOT_FOUND = 'BRANCH_NOT_FOUND'
class CheckoutResult(StrEnum): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
68
3
0
3
3
2
0
3
3
2
0
3
0
0
327,191
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/enums.py
enums.DiffChangeType
from enum import StrEnum, auto class DiffChangeType(StrEnum): ADDED = 'A' DELETED = 'D' RENAMED = 'R' MODIFIED = 'M'
class DiffChangeType(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,192
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/enums.py
enums.Edge
from graph_sitter.core.dataclasses.usage import Usage from typing import NamedTuple class Edge(NamedTuple): type: EdgeType usage: Usage | None
class Edge(NamedTuple): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
3
0
3
1
2
0
3
1
2
0
1
0
0
327,193
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/enums.py
enums.EdgeType
from enum import IntEnum, auto class EdgeType(IntEnum): IMPORT_SYMBOL_RESOLUTION = auto() EXPORT = auto() SUBCLASS = auto() SYMBOL_USAGE = auto()
class EdgeType(IntEnum): pass
1
0
0
0
0
0
0
1
1
0
0
0
0
0
0
55
10
0
5
5
4
5
5
5
4
0
3
0
0
327,194
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/enums.py
enums.FetchResult
from enum import StrEnum, auto class FetchResult(StrEnum): SUCCESS = 'SUCCESS' REFSPEC_NOT_FOUND = 'REFSPEC_NOT_FOUND'
class FetchResult(StrEnum): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
68
3
0
3
3
2
0
3
3
2
0
3
0
0
327,195
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/enums.py
enums.FileGraphEdgeType
from enum import IntEnum, auto class FileGraphEdgeType(IntEnum): STATEMENT_CONTAINS_EXPRESSION = auto()
class FileGraphEdgeType(IntEnum): pass
1
0
0
0
0
0
0
1
1
0
0
0
0
0
0
55
3
0
2
2
1
2
2
2
1
0
3
0
0
327,196
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/enums.py
enums.FileGraphNodeType
from enum import IntEnum, auto class FileGraphNodeType(IntEnum): STATEMENT = auto() EXPRESSION = auto()
class FileGraphNodeType(IntEnum): pass
1
0
0
0
0
0
0
1
1
0
0
0
0
0
0
55
4
0
3
3
2
3
3
3
2
0
3
0
0
327,197
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/enums.py
enums.FlagKwargs
from typing import TypedDict from typing_extensions import ReadOnly from graph_sitter.shared.decorators.docs import apidoc @apidoc class FlagKwargs(TypedDict, total=False): """Kwargs for the flag_instance method of the Codebase class. Attributes: message: The message to be displayed in the diff previe...
@apidoc class FlagKwargs(TypedDict, total=False): '''Kwargs for the flag_instance method of the Codebase class. Attributes: message: The message to be displayed in the diff preview or posted as a comment on the PR. message_type: Where the message will be sent (CODEGEN, GITHUB, SLACK) mes...
2
1
0
0
0
0
0
1.5
2
0
0
0
0
0
0
0
12
2
4
1
3
6
4
1
3
0
1
0
0
327,198
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/visualizations/enums.py
enums.GraphJson
from dataclasses import dataclass @dataclass(frozen=True) class GraphJson: type: str data: dict
@dataclass(frozen=True) class GraphJson: pass
2
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
3
0
3
1
2
0
3
1
2
0
0
0
0
327,199
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/visualizations/enums.py
enums.GraphType
from enum import StrEnum class GraphType(StrEnum): TREE = 'tree' GRAPH = 'graph'
class GraphType(StrEnum): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
68
3
0
3
3
2
0
3
3
2
0
3
0
0